PROBLEM: Linux ATAPI CDROM ->FIX: SAMSUNG CD-ROM SC-140
The problem first appeared in Linux 2.4.21 when the "ide-dma" source experienced
a significant overhaul, but worked OK in Linux versions 2.4.5 through 2.4.20.
The problem still exists in Linux 2.4.32.
Attempts to mount a SAMSUNG SC-140 CDROM are allowing DMA which fails because of a problem in the following source code file:
<linux>/drivers/ide/ide-dma.c
User sees displayed
mount: Directory not available
The fix is to add the following record to the drive_blacklist[] table.
{ "SAMSUNG CD-ROM SC-140", "ALL" },This model of SAMSUNG CD-ROM disk drive is original equipment on the E=Machines etower 556i2 compters, and possibly many other models.
DMA should not be performed on this CDROM model, therefore I submit the drive_blacklist[] request.
I had given up on upgrading Linux on this platform until the fix was found
and tested. The fix works with all Linux 2.4.21 through 2.4.32 versions
of stable kernels.
Sincerely,
Steven J. Hathaway
<[email protected]>
Have you considered stubbing out the blacklist call for your model and how does it behave?
Andre Hedrick
LAD Storage Consulting Group
Quoted 36 lines · Steven J. Hathaway
The problem first appeared in Linux 2.4.21 when the "ide-dma" source experienced
a significant overhaul, but worked OK in Linux versions 2.4.5 through 2.4.20.
The problem still exists in Linux 2.4.32.Attempts to mount a SAMSUNG SC-140 CDROM are allowing DMA which fails because of a problem in the following source code file:
<linux>/drivers/ide/ide-dma.c
User sees displayed
mount: Directory not availableThe fix is to add the following record to the drive_blacklist[] table.
{ "SAMSUNG CD-ROM SC-140", "ALL" },This model of SAMSUNG CD-ROM disk drive is original equipment on the E=Machines etower 556i2 compters, and possibly many other models.
DMA should not be performed on this CDROM model, therefore I submit the drive_blacklist[] request.
I had given up on upgrading Linux on this platform until the fix was found
and tested. The fix works with all Linux 2.4.21 through 2.4.32 versionsof stable kernels.
Sincerely,
Steven J. Hathaway
<[email protected]>
Quoted 3 lines · Steven J. Hathaway
The fix is to add the following record to the drive_blacklist[] table.
{ "SAMSUNG CD-ROM SC-140", "ALL" },
This is not a fix since you said before the drive worked back in 2.4.20. You need to find out what in 2.4.20-21 broke the support rather than just turning it off.
You could equally just use hdparm -d0 until you fix it.
Alan
Quoted 10 lines · Alan Cox
Quoted 3 lines · Steven J. Hathaway
The fix is to add the following record to the drive_blacklist[] table.
{ "SAMSUNG CD-ROM SC-140", "ALL" },This is not a fix since you said before the drive worked back in 2.4.20. You need to find out what in 2.4.20-21 broke the support rather than just turning it off.
You could equally just use hdparm -d0 until you fix it.
I have a similar issue with a 'SAMSUNG SC-140B' CDROM in 2.4.latest and also 2.6.latest.
hdparm -d0 /dev/hdc + hdparm -X8 /dev/hdc fixes it :(
I updated the CDROM firmware, no change. With 2.4.33-pre1:
syslog:
Jan 2 09:02:33 niner kernel: hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
Jan 2 09:02:33 niner kernel: hdc: drive_cmd: error=0x04Aborted Command
Jan 2 09:02:52 niner kernel: hdc: CHECK for good STATUS
Jan 2 09:03:26 niner kernel: hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }CDROM is stuck at the moment:
root 279 0.0 0.3 1688 612 ttyp1 D+ 09:03 0:00 mount /dev/hdc /mnt/cdrom/
Should I ignore this and replace the CDROM or blacklist the thing?
The box here is a s/h thing I've had for only a month, no history for you. What other testing you suggest to narrow the thing down?
Hmm, while I wrote this, the driver recovered, syslog:
Jan 2 09:18:28 niner kernel: hdc: media error (bad sector): error=0x34
Jan 2 09:18:28 niner kernel: end_request: I/O error, dev 16:00 (hdc), sector 60
Jan 2 09:18:43 niner kernel: hdc: DMA interrupt recovery
Jan 2 09:18:43 niner kernel: hdc: lost interrupt
Jan 2 09:18:43 niner kernel: hdc: status timeout: status=0xd0 { Busy }
Jan 2 09:18:43 niner kernel: hdc: status timeout: error=0x00
Jan 2 09:18:43 niner kernel: hdc: drive not ready for command
Jan 2 09:18:43 niner kernel: hdc: ATAPI reset completeBox info: http://bugsplatter.mine.nu/test/boxen/niner/ this is same box I tickled an oops out of under 2.6.14.5 playing with the CDROM.
Thanks,
Grant.
Quoted 4 lines · Grant Coady
Jan 2 09:02:33 niner kernel: hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
Jan 2 09:02:33 niner kernel: hdc: drive_cmd: error=0x04Aborted Command
Jan 2 09:02:52 niner kernel: hdc: CHECK for good STATUS
Jan 2 09:03:26 niner kernel: hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }Thats showing a media error. Shouldn't have caused a hang however.
Quoted 8 lines · Alan Cox
Quoted 4 lines · Grant Coady
Jan 2 09:02:33 niner kernel: hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error } Jan 2 09:02:33 niner kernel: hdc: drive_cmd: error=0x04Aborted Command Jan 2 09:02:52 niner kernel: hdc: CHECK for good STATUS Jan 2 09:03:26 niner kernel: hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }Thats showing a media error. Shouldn't have caused a hang however.
Solved (sort of):
login as: root
Authenticating with public key "grant@peetoo" from agent Last login: Mon Jan 2 10:10:08 2006 from magpie.squishybuglet.mine.nu Linux 2.4.33-pre1.
The grass is always greener on the other side of your sunglasses.
root@niner:~# dmesg |grep hdc
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hdc: LTN526D, ATAPI CD/DVD-ROM drive
hdc: attached ide-cdrom driver.
hdc: ATAPI 52X CD-ROM drive, 120kB Cache, UDMA(33)
root@niner:~# mount /dev/hdc /mnt/cdrom/
mount: block device /dev/hdc is write-protected, mounting read-only
root@niner:~# ls /mnt/cdrom/
CHECKSUMS.md5 CHECKSUMS.md5.asc FILELIST.TXT README.TXT pasture/ source/ zipslack/
root@niner:~# hdparm -I /dev/hdc/dev/hdc:
ATAPI CD-ROM, with removable media
Model Number: LTN526D
Serial Number:
Firmware Revision: 9S01
Standards:
Used: ATAPI for CD-ROMs, SFF-8020i, r2.5
Supported: CD-ROM ATAPI-1
Configuration:
DRQ response: 50us.
Packet size: 12 bytes
Capabilities:
LBA, IORDY(can be disabled)
DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 *udma2
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
That's the same (stamped) CD I used before with the Samsung, maybe I can use the Samsung for error testing libata PATA when it gets here ;)
Cheers,
Grant.