Re: Linux 2.2.0-pre6 bug -- error mounting CDROM

Todd A. Wood (tawood-noreply@datacomm.ch)
Wed, 13 Jan 1999 00:55:25 +0100


Jens Axboe wrote:
>
> Elias Ross wrote:
> > During bootup, I get the following messages: The CDROM mounts and
> > works fine under linux 2.0.34. (Linux smiley 2.0.34 #7 Sat Sep 12
> > 10:40:27 JST 1998 i686 unknown)
> >
> > It is an ADAPI drive.
> >
> > mount: block device /dev/hdc is write-protected, mounting read-only
> > hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
> > hdc: packet command error: error=0x50
> > ATAPI device hdc:
> > Error: Illegal request -- (Sense key=0x05)
> > Invalid field in command packet -- (asc=0x24, ascq=0x00)
> > The failed "Start Stop Unit" packet command was:
> > "1b 00 00 00 03 00 00 00 00 00 00 00 "
> > Error in command packet byte 26697 bit 0
> > cdrom: open failed.
> > mount: No medium found
>
> What drive is this? Have you been using 2.1 kernels earlier or are
> you just now trying out the 2.2.0-pre series? And the drive isn't
> empty?
>
> I guess you can tell I'm dumbfounded by this, so please e-mail
> me all the relevant information. Could you also try and set
> debug=1 in cdrom.c?

I have seen the same thing since the pre5 patch to cdrom.c (pre6 patched
looked to be a spelling patch)

>diff -u --recursive --new-file v2.2.0-pre4/linux/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
>--- v2.2.0-pre4/linux/drivers/cdrom/cdrom.c Mon Dec 28 15:00:52 1998
>+++ linux/drivers/cdrom/cdrom.c Mon Jan 4 11:58:44 1999
>@@ -376,8 +376,10 @@
> }
> cdinfo(CD_OPEN, "the tray is now closed.\n");
> }
>- if (ret!=CDS_DISC_OK)
>+ if (ret!=CDS_DISC_OK) {
>+ ret = -ENOMEDIUM;
> goto clean_up_and_return;
>+ }
> }
> cdrom_count_tracks(cdi, &tracks);
> if (tracks.error == CDS_NO_DISC) {
>

I can recreate the problem with running an AfterStep app to play cd's
"ascd". The problem only manifested itself when I booted w/o any CDROM
in the drive. Before that time, ascd had found an audio cd in the
drive.

The drive is otherwise functional.. Insert CD it plays.. insert data cd,
it mounts.

[tawood@tawman kernel]$ which ascd
/usr/local/bin/ascd
[tawood@tawman kernel]$ ascd
/dev/cdrom: No medium found
[tawood@tawman kernel]$ uname -a # with pre5 crypto patch applied
# same behavior without crypto patch
Linux tawman 2.2.0-pre6-ac2 #10 Tue Jan 12 21:59:12 CET 1999 i686
unknown

dmesg output at the time of running ascd:

Linux version 2.2.0-pre6-ac2 (root@tawman) (gcc version 2.7.2.3) #10 Tue
Jan 12 21:59:12 CET 1999
Detected 265750775 Hz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 264.60 BogoMIPS
Memory: 144256k/147456k available (780k kernel code, 408k reserved,
1960k data, 52k init)
VFS: Diskquotas version dquot_6.4.0 initialized
CPU: Intel Pentium II (Deschutes) stepping 00
Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
PCI: PCI BIOS revision 2.10 entry at 0xfda13
PCI: Using configuration type 1
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
Initializing RT netlink socket
Starting kswapd v 1.5
Serial driver version 4.27 with no serial options enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS02 at 0x03e8 (irq = 4) is a 16550A
pty: 256 Unix98 ptys configured
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.8)
Real Time Clock Driver v1.09
PIIX4: IDE controller on PCI bus 00 dev 39
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xfcd0-0xfcd7, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xfcd8-0xfcdf, BIOS settings: hdc:pio, hdd:pio
hda: IBM-DADA-26480, ATA DISK drive
hdc: TOSHIBA CD-ROM XM-1702BC, ATAPI CDROM drive
ide2: ports already in use, skipping probe
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: IBM-DADA-26480, 6194MB w/460kB Cache, CHS=839/240/63, UDMA
hdc: ATAPI 24X CDROM drive, 128kB Cache
Uniform CDROM driver Revision: 2.51
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
Partition check:
hda: hda1 hda2 < hda5 hda6 hda7 > hda3 hda4
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 52k freed
Adding Swap: 90716k swap-space (priority -1)
Linux PCMCIA Card Services 3.0.8
kernel build: 2.2.0-pre6-ac2 #9 Tue Jan 12 13:01:48 CET 1999
options: [pci] [apm]
Intel PCIC probe:
TI 1131 PCI-to-CardBus at bus 0 slot 4, mem 0x68000000, 2 sockets
host opts [0]: [pci + serial irq] [no pci irq] [lat 168/176] [bus
32/34]
host opts [1]: [pci + serial irq] [no pci irq] [lat 168/176] [bus
35/37]
ISA irqs (default) = 3 polling interval = 1000 ms
cs: IO port probe 0x0120-0x012f: clean.
cs: IO port probe 0x02f8-0x02ff: clean.
cs: memory probe 0x9001000-0x9001fff: clean.
eth0: 3Com 3c589, port 0x120, irq 3, Auto port, hw_addr
00:00:86:18:84:94
tty01 at 0x02f8 (irq = 3) is a 16550A
ad1848/cs4248 codec driver Copyright (C) by Hannu Savolainen 1993-1996
eth0: autodetected 10baseT
CSLIP: code copyright 1989 Regents of the University of California
PPP: version 2.3.3 (demand dialling)
PPP line discipline registered.
registered device ppp0
PPP BSD Compression module registered
PPP Deflate Compression module registered
Registered des (2)
Registered des-cbc (65538)
ipgrab uses obsolete (PF_INET,SOCK_PACKET)
device eth0 entered promiscuous mode
ISO 9660 Extensions: RRIP_1991A
hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdc: packet command error: error=0x50
ATAPI device hdc:
Error: Illegal request -- (Sense key=0x05)
Invalid field in command packet -- (asc=0x24, ascq=0x00)
The failed "Start Stop Unit" packet command was:
"1b 00 00 00 03 00 00 00 00 00 00 00 "
Error in command packet byte 37903 bit 0
cdrom: open failed.
VFS: Disk change detected on device ide1(22,0)

----
Sincerely,
Todd A. Wood
Wood Consulting Group, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/