* ide-cd vs. DMA
@ 2005-05-23 23:42 Benjamin Herrenschmidt
2005-05-24 3:27 ` Karim Yaghmour
0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2005-05-23 23:42 UTC (permalink / raw)
To: Jens Axboe; +Cc: Linux Kernel list
Hi Jens !
Yet another case of ide-cd bogosly switching DMA of on ATAPI errors...
can this be fixed one day ? :)
The error this time is
hdb: command error: status=0x51 { DriveReady SeekComplete Error }
hdb: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdb, sector 42872
Ben.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: ide-cd vs. DMA 2005-05-23 23:42 ide-cd vs. DMA Benjamin Herrenschmidt @ 2005-05-24 3:27 ` Karim Yaghmour 2005-05-24 3:24 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 10+ messages in thread From: Karim Yaghmour @ 2005-05-24 3:27 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: Jens Axboe, Linux Kernel list Benjamin Herrenschmidt wrote: > hdb: command error: status=0x51 { DriveReady SeekComplete Error } > hdb: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 } > ide: failed opcode was: unknown > end_request: I/O error, dev hdb, sector 42872 Got plenty of these an old Dell Optiplex GX1 (PIII-450) with vanilla FC3. ... you've got to wonder when the kernel says there are bad sectors on a CD (?) and then they disappear with: hdparm -d0 /dev/hdc Karim -- Author, Speaker, Developer, Consultant Pushing Embedded and Real-Time Linux Systems Beyond the Limits http://www.opersys.com || karim@opersys.com || 1-866-677-4546 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ide-cd vs. DMA 2005-05-24 3:27 ` Karim Yaghmour @ 2005-05-24 3:24 ` Benjamin Herrenschmidt 2005-05-24 3:59 ` Karim Yaghmour ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Benjamin Herrenschmidt @ 2005-05-24 3:24 UTC (permalink / raw) To: karim; +Cc: Jens Axboe, Linux Kernel list On Mon, 2005-05-23 at 23:27 -0400, Karim Yaghmour wrote: > Benjamin Herrenschmidt wrote: > > hdb: command error: status=0x51 { DriveReady SeekComplete Error } > > hdb: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 } > > ide: failed opcode was: unknown > > end_request: I/O error, dev hdb, sector 42872 > > Got plenty of these an old Dell Optiplex GX1 (PIII-450) with > vanilla FC3. ... you've got to wonder when the kernel says there > are bad sectors on a CD (?) and then they disappear with: > hdparm -d0 /dev/hdc Well, not sure what's wrong here, but ATAPI errors shouldn't normally result in stopping DMA. We may want to just blacklist your drive rather than having this stupid fallback. In this case, I suspect it's CSS/region issue with a DVD. Ben. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ide-cd vs. DMA 2005-05-24 3:24 ` Benjamin Herrenschmidt @ 2005-05-24 3:59 ` Karim Yaghmour 2005-05-24 4:03 ` Benjamin Herrenschmidt 2005-05-25 1:31 ` Kurt Wall 2005-05-26 14:29 ` Alan Cox 2 siblings, 1 reply; 10+ messages in thread From: Karim Yaghmour @ 2005-05-24 3:59 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: Jens Axboe, Linux Kernel list Benjamin Herrenschmidt wrote: > Well, not sure what's wrong here, but ATAPI errors shouldn't normally > result in stopping DMA. We may want to just blacklist your drive rather > than having this stupid fallback. In this case, I suspect it's > CSS/region issue with a DVD. Here's a little bit more info: Here's from dmesg: hdc: SAMSUNG SC-140B, ATAPI CD/DVD-ROM drive hdc: ATAPI 40X CD-ROM drive, 128kB Cache, UDMA(33) hdparm -i /dev/hdc: /dev/hdc: Model=SAMSUNG SC-140B, FwRev=d005, SerialNo= Config={ SpinMotCtl Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic } RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0 BuffType=unknown, BuffSize=0kB, MaxMultSect=0 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4 DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 UDMA modes: udma0 udma1 *udma2 AdvancedPM=no Here's what happens on the first mount attempt: hdc: DMA interrupt recovery hdc: lost interrupt hdc: status timeout: status=0xd0 { Busy } hdc: status timeout: error=0x00 hdc: DMA disabled hdc: drive not ready for command hdc: ATAPI reset complete Now, if I'm stuborn and re-enable DMA using a "hdparm -d1 /dev/hdc" and then try again, now I get: hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error } hdc: media error (bad sector): error=0x34 ide: failed opcode was 100 end_request: I/O error, dev hdc, sector 16 The last error being repeated ad-nauseam for every "sector" on the disk. Again, note that this is a CD drive, not a hard disk. Here's from lspci: 00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03) 00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03) 00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02) 00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01) 00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01) 00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 02) 00:11.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 24) 01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP 1X/2X (rev 5c) In attempting to isolate the problem, I ran into a spurious issue with another drive I have in that machine: hda: dma_timer_expiry: dma status == 0x61 hda: DMA timeout error hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest } hda: dma_timer_expiry: dma status == 0x61 hda: DMA timeout error hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest } hda: dma_timer_expiry: dma status == 0x61 hda: DMA timeout error hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest } hda: dma_timer_expiry: dma status == 0x61 hda: DMA timeout error hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest } hda: DMA disabled Try as I may, however, I haven't been able to reproduce this problem with hda (from dmesg: hda: WDC AC22500L, ATA DISK drive). It's worthy pointing out that the machine came with a drive on which it was found that there were actual bad sectors (tested on another machine.) ... the thought of a buggy controller came to mind, but (though this may be possible), I've never heard about a bad controller generating bad sectors ... Karim -- Author, Speaker, Developer, Consultant Pushing Embedded and Real-Time Linux Systems Beyond the Limits http://www.opersys.com || karim@opersys.com || 1-866-677-4546 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ide-cd vs. DMA 2005-05-24 3:59 ` Karim Yaghmour @ 2005-05-24 4:03 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 10+ messages in thread From: Benjamin Herrenschmidt @ 2005-05-24 4:03 UTC (permalink / raw) To: karim; +Cc: Jens Axboe, Linux Kernel list On Mon, 2005-05-23 at 23:59 -0400, Karim Yaghmour wrote: > Benjamin Herrenschmidt wrote: > > Well, not sure what's wrong here, but ATAPI errors shouldn't normally > > result in stopping DMA. We may want to just blacklist your drive rather > > than having this stupid fallback. In this case, I suspect it's > > CSS/region issue with a DVD. > > Here's a little bit more info: > > Here's from dmesg: > hdc: SAMSUNG SC-140B, ATAPI CD/DVD-ROM drive > hdc: ATAPI 40X CD-ROM drive, 128kB Cache, UDMA(33) .../... That's a lot of problems ... I would blame HW here, either a bad cable, bad master/slave jumpers or a bad drive in the chain... or maybe as you suggested, a problem with the controller. Ben. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ide-cd vs. DMA 2005-05-24 3:24 ` Benjamin Herrenschmidt 2005-05-24 3:59 ` Karim Yaghmour @ 2005-05-25 1:31 ` Kurt Wall 2005-05-25 16:12 ` Lennart Sorensen 2005-05-26 14:29 ` Alan Cox 2 siblings, 1 reply; 10+ messages in thread From: Kurt Wall @ 2005-05-25 1:31 UTC (permalink / raw) To: Linux Kernel list On Monday 23 May 2005 23:24, Benjamin Herrenschmidt enlightened us thusly: > On Mon, 2005-05-23 at 23:27 -0400, Karim Yaghmour wrote: > > Benjamin Herrenschmidt wrote: > > > hdb: command error: status=0x51 { DriveReady SeekComplete Error } > > > hdb: command error: error=0x54 { AbortedCommand > > > LastFailedSense=0x05 } ide: failed opcode was: unknown > > > end_request: I/O error, dev hdb, sector 42872 > > > > Got plenty of these an old Dell Optiplex GX1 (PIII-450) with > > vanilla FC3. ... you've got to wonder when the kernel says there > > are bad sectors on a CD (?) and then they disappear with: > > hdparm -d0 /dev/hdc > > Well, not sure what's wrong here, but ATAPI errors shouldn't normally > result in stopping DMA. We may want to just blacklist your drive > rather than having this stupid fallback. In this case, I suspect it's > CSS/region issue with a DVD. I see the same thing here on a plain vanilla CD-ROM (pardon the unsightly wrapping): May 23 21:52:34 luther kernel: hdc: packet command error: status=0x51 { DriveReady SeekComplete Error } May 23 21:52:34 luther kernel: hdc: packet command error: error=0x54 { AbortedCommand LastFailedSense=0x05 } May 23 23:12:37 luther kernel: hdc: packet command error: status=0x51 { DriveReady SeekComplete Error } May 23 23:12:37 luther kernel: hdc: packet command error: error=0x54 { AbortedCommand LastFailedSense=0x05 } Kurt ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ide-cd vs. DMA 2005-05-25 1:31 ` Kurt Wall @ 2005-05-25 16:12 ` Lennart Sorensen 0 siblings, 0 replies; 10+ messages in thread From: Lennart Sorensen @ 2005-05-25 16:12 UTC (permalink / raw) To: Kurt Wall; +Cc: Linux Kernel list On Tue, May 24, 2005 at 09:31:46PM -0400, Kurt Wall wrote: > I see the same thing here on a plain vanilla CD-ROM (pardon the > unsightly wrapping): > > May 23 21:52:34 luther kernel: hdc: packet command error: status=0x51 > { DriveReady SeekComplete Error } > May 23 21:52:34 luther kernel: hdc: packet command error: error=0x54 > { AbortedCommand LastFailedSense=0x05 } > May 23 23:12:37 luther kernel: hdc: packet command error: status=0x51 > { DriveReady SeekComplete Error } > May 23 23:12:37 luther kernel: hdc: packet command error: error=0x54 > { AbortedCommand LastFailedSense=0x05 } Looks a lot like the MultiMode problem that the kernel has an option for dealing with. I remember needing that on a 440BX based system in the past (and the Dell GX1 is such a system too). Len Sorensen ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ide-cd vs. DMA 2005-05-24 3:24 ` Benjamin Herrenschmidt 2005-05-24 3:59 ` Karim Yaghmour 2005-05-25 1:31 ` Kurt Wall @ 2005-05-26 14:29 ` Alan Cox 2 siblings, 0 replies; 10+ messages in thread From: Alan Cox @ 2005-05-26 14:29 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: karim, Jens Axboe, Linux Kernel Mailing List On Maw, 2005-05-24 at 04:24, Benjamin Herrenschmidt wrote: > Well, not sure what's wrong here, but ATAPI errors shouldn't normally > result in stopping DMA. We may want to just blacklist your drive rather > than having this stupid fallback. In this case, I suspect it's > CSS/region issue with a DVD. The fallback should only be triggering on a DMA CRC error. Turning DMA off or using ide-scsi works (as generally does using the -ac kernel tree) because that handles partial completions correctly while readahead caused errors break the base ide-cd driver badly. I would suggest avoiding the ide-cd driver in the base kernel for most purposes, at least until that bug and the "rmmod cache flush" bug are fixed. Alan ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: ide-cd vs. DMA @ 2005-05-24 4:26 Chad Kitching 2005-05-24 4:42 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 10+ messages in thread From: Chad Kitching @ 2005-05-24 4:26 UTC (permalink / raw) To: Benjamin Herrenschmidt, karim; +Cc: Jens Axboe, Linux Kernel list Are you using hdparm -k1 to keep your settings over a reset? If you're not, then this behaviour is really by-design. -----Original Message----- From: Benjamin Herrenschmidt Sent: May 23, 2005 10:25 PM Subject: Re: ide-cd vs. DMA Well, not sure what's wrong here, but ATAPI errors shouldn't normally result in stopping DMA. We may want to just blacklist your drive rather than having this stupid fallback. In this case, I suspect it's CSS/region issue with a DVD. Ben. ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: ide-cd vs. DMA 2005-05-24 4:26 Chad Kitching @ 2005-05-24 4:42 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 10+ messages in thread From: Benjamin Herrenschmidt @ 2005-05-24 4:42 UTC (permalink / raw) To: Chad Kitching; +Cc: karim, Jens Axboe, Linux Kernel list On Mon, 2005-05-23 at 23:26 -0500, Chad Kitching wrote: > Are you using hdparm -k1 to keep your settings over a reset? If you're > not, then this behaviour is really by-design. And is broken. You can't expect users to play with hdparm and it's quite common to have things like CSS or region errors on a DVD, taht shouldn't turn your DMA off on the CD. Damn, we are in 2005 folks ! Ben; ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-05-26 14:31 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-05-23 23:42 ide-cd vs. DMA Benjamin Herrenschmidt 2005-05-24 3:27 ` Karim Yaghmour 2005-05-24 3:24 ` Benjamin Herrenschmidt 2005-05-24 3:59 ` Karim Yaghmour 2005-05-24 4:03 ` Benjamin Herrenschmidt 2005-05-25 1:31 ` Kurt Wall 2005-05-25 16:12 ` Lennart Sorensen 2005-05-26 14:29 ` Alan Cox -- strict thread matches above, loose matches on Subject: below -- 2005-05-24 4:26 Chad Kitching 2005-05-24 4:42 ` Benjamin Herrenschmidt
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.