2005-12-31 05:18:13

by Steven J. Hathaway

[permalink] [raw]
Subject: 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]>




2005-12-31 10:05:23

by Andre Hedrick

[permalink] [raw]
Subject: Re: PROBLEM: Linux ATAPI CDROM ->FIX: SAMSUNG CD-ROM SC-140


Have you considered stubbing out the blacklist call for your model and how
does it behave?

Andre Hedrick
LAD Storage Consulting Group

On Fri, 30 Dec 2005, Steven J. Hathaway wrote:

> 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]>
>
>
>

2005-12-31 12:09:41

by Alan

[permalink] [raw]
Subject: Re: PROBLEM: Linux ATAPI CDROM ->FIX: SAMSUNG CD-ROM SC-140

On Gwe, 2005-12-30 at 21:17 -0800, Steven J. Hathaway wrote:
> 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

2006-01-01 22:23:16

by Grant Coady

[permalink] [raw]
Subject: Re: PROBLEM: Linux ATAPI CDROM ->FIX: SAMSUNG CD-ROM SC-140

On Sat, 31 Dec 2005 12:06:28 +0000, Alan Cox <[email protected]> wrote:

>On Gwe, 2005-12-30 at 21:17 -0800, Steven J. Hathaway wrote:
>> 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 complete

Box 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.

2006-01-01 22:37:10

by Alan

[permalink] [raw]
Subject: Re: PROBLEM: Linux ATAPI CDROM ->FIX: SAMSUNG CD-ROM SC-140

On Llu, 2006-01-02 at 09:23 +1100, Grant Coady wrote:
> 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.

2006-01-01 23:20:54

by Grant Coady

[permalink] [raw]
Subject: Re: PROBLEM: Linux ATAPI CDROM ->FIX: SAMSUNG CD-ROM SC-140

On Sun, 01 Jan 2006 22:34:55 +0000, Alan Cox <[email protected]> wrote:

>On Llu, 2006-01-02 at 09:23 +1100, Grant Coady wrote:
>> 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.