public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* readcd hangs in blk_execute_rq
@ 2004-10-21 15:11 Meelis Roos
  2004-10-21 15:41 ` Jens Axboe
  0 siblings, 1 reply; 11+ messages in thread
From: Meelis Roos @ 2004-10-21 15:11 UTC (permalink / raw)
  To: Linux Kernel list

I'm trying to readcd a cd, in 2.6.9+todays BK snapshot.

I got an error the first time so I started it (readcd dev=/dev/hdc)
the second time and chose c2scan. This resulted in the messages
...
end:    328460
C2 in sector: 1864 first at byte: 2256 (0xF0) total:   72 errors
C2 in sector: 1865 first at byte:   12 (0x0F) total: 2335 errors
addr:     2499 cnt: 49

And here it hangs. ps shows readcd is in D state, in blk_execute_rq.
dmesg shows lines of

hdc: lost interrupt

every no and then.

This a IDE CD on Intel ICH2 ide controller:

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH2: IDE controller at PCI slot 0000:00:1f.1
ICH2: chipset revision 2
ICH2: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio

hdc: CDU5211, ATAPI CD/DVD-ROM drive
hdc: ATAPI 52X CD-ROM drive, 120kB Cache, UDMA(33)

And after every boot it gets DMA timeout on first read and switches to
PIO mode and works fine there reading data cd-s (even browsing the same
CD):

ide-cd: cmd 0x28 timed out
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


-- 
Meelis Roos (mroos@linux.ee)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 15:11 readcd hangs in blk_execute_rq Meelis Roos
@ 2004-10-21 15:41 ` Jens Axboe
  2004-10-21 15:47   ` Meelis Roos
  0 siblings, 1 reply; 11+ messages in thread
From: Jens Axboe @ 2004-10-21 15:41 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list

On Thu, Oct 21 2004, Meelis Roos wrote:
> I'm trying to readcd a cd, in 2.6.9+todays BK snapshot.
> 
> I got an error the first time so I started it (readcd dev=/dev/hdc)
> the second time and chose c2scan. This resulted in the messages
> ...
> end:    328460
> C2 in sector: 1864 first at byte: 2256 (0xF0) total:   72 errors
> C2 in sector: 1865 first at byte:   12 (0x0F) total: 2335 errors
> addr:     2499 cnt: 49
> 
> And here it hangs. ps shows readcd is in D state, in blk_execute_rq.
> dmesg shows lines of
> 
> hdc: lost interrupt
> 
> every no and then.
> 
> This a IDE CD on Intel ICH2 ide controller:
> 
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> ICH2: IDE controller at PCI slot 0000:00:1f.1
> ICH2: chipset revision 2
> ICH2: not 100% native mode: will probe irqs later
>     ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio
>     ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
> 
> hdc: CDU5211, ATAPI CD/DVD-ROM drive
> hdc: ATAPI 52X CD-ROM drive, 120kB Cache, UDMA(33)
> 
> And after every boot it gets DMA timeout on first read and switches to
> PIO mode and works fine there reading data cd-s (even browsing the same
> CD):
> 
> ide-cd: cmd 0x28 timed out
> 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

Did it previously work reliably with dma (which kernel)? Does it now
work reliably without dma now? Do send your entire dmesg after a boot
too, btw.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 15:41 ` Jens Axboe
@ 2004-10-21 15:47   ` Meelis Roos
  2004-10-21 16:11     ` Jens Axboe
  0 siblings, 1 reply; 11+ messages in thread
From: Meelis Roos @ 2004-10-21 15:47 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linux Kernel list

> > And here it hangs. ps shows readcd is in D state, in blk_execute_rq.
> > dmesg shows lines of
> >
> > hdc: lost interrupt

Meanwhile I found out that if I eject the CD by pressing button, it
resumes its work and reports error to the user process.

> > ide-cd: cmd 0x28 timed out
> > 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
>
> Did it previously work reliably with dma (which kernel)? Does it now
> work reliably without dma now? Do send your entire dmesg after a boot
> too, btw.

It worked in earlier 2.4 kernels (2.4.18?) with DMA - I don't remember
if it had some reliability problems. Since then, it's no dma. We have 3
such computers here (Intel D816EEA2 mainboard, this specific Sony CDrom)
and they all behave the same.

-- 
Meelis Roos (mroos@linux.ee)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 15:47   ` Meelis Roos
@ 2004-10-21 16:11     ` Jens Axboe
  2004-10-21 16:19       ` Meelis Roos
  2004-10-21 17:16       ` Meelis Roos
  0 siblings, 2 replies; 11+ messages in thread
From: Jens Axboe @ 2004-10-21 16:11 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list

On Thu, Oct 21 2004, Meelis Roos wrote:
> > > And here it hangs. ps shows readcd is in D state, in blk_execute_rq.
> > > dmesg shows lines of
> > >
> > > hdc: lost interrupt
> 
> Meanwhile I found out that if I eject the CD by pressing button, it
> resumes its work and reports error to the user process.
> 
> > > ide-cd: cmd 0x28 timed out
> > > 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
> >
> > Did it previously work reliably with dma (which kernel)? Does it now
> > work reliably without dma now? Do send your entire dmesg after a boot
> > too, btw.
> 
> It worked in earlier 2.4 kernels (2.4.18?) with DMA - I don't remember
> if it had some reliability problems. Since then, it's no dma. We have 3
> such computers here (Intel D816EEA2 mainboard, this specific Sony CDrom)
> and they all behave the same.

2.4.x never used dma for this operation. Does 2.6.9 work if you turn off
dma first?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 16:11     ` Jens Axboe
@ 2004-10-21 16:19       ` Meelis Roos
  2004-10-21 16:22         ` Jens Axboe
  2004-10-21 17:16       ` Meelis Roos
  1 sibling, 1 reply; 11+ messages in thread
From: Meelis Roos @ 2004-10-21 16:19 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linux Kernel list

> > > > ide-cd: cmd 0x28 timed out
> > > > 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

> > It worked in earlier 2.4 kernels (2.4.18?) with DMA - I don't remember
> > if it had some reliability problems. Since then, it's no dma. We have 3
> > such computers here (Intel D816EEA2 mainboard, this specific Sony CDrom)
> > and they all behave the same.
>
> 2.4.x never used dma for this operation. Does 2.6.9 work if you turn off
> dma first?

I have not tried this operation before. Reading data disks with DMA
worked and that's what I have used. I did read the same disk with
readdisk subcommand on readcd currently, it was successful until the end
of disk (6xx MB - maybe the end of the disk).

Will try it with turning DMA off first.

-- 
Meelis Roos (mroos@linux.ee)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 16:19       ` Meelis Roos
@ 2004-10-21 16:22         ` Jens Axboe
  0 siblings, 0 replies; 11+ messages in thread
From: Jens Axboe @ 2004-10-21 16:22 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list

On Thu, Oct 21 2004, Meelis Roos wrote:
> > > > > ide-cd: cmd 0x28 timed out
> > > > > 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
> 
> > > It worked in earlier 2.4 kernels (2.4.18?) with DMA - I don't remember
> > > if it had some reliability problems. Since then, it's no dma. We have 3
> > > such computers here (Intel D816EEA2 mainboard, this specific Sony CDrom)
> > > and they all behave the same.
> >
> > 2.4.x never used dma for this operation. Does 2.6.9 work if you turn off
> > dma first?
> 
> I have not tried this operation before. Reading data disks with DMA
> worked and that's what I have used. I did read the same disk with
> readdisk subcommand on readcd currently, it was successful until the end
> of disk (6xx MB - maybe the end of the disk).

Yes you are right, readcd should use dma.

> Will try it with turning DMA off first.

Ok

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 16:11     ` Jens Axboe
  2004-10-21 16:19       ` Meelis Roos
@ 2004-10-21 17:16       ` Meelis Roos
  2004-10-21 20:15         ` Jens Axboe
  1 sibling, 1 reply; 11+ messages in thread
From: Meelis Roos @ 2004-10-21 17:16 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linux Kernel list

> Does 2.6.9 work if you turn off
> dma first?

Turned DMA off with hdparm -d 0 /dev/hdc, still the same.
Turned ATAPI DMA support off completely (activated "Use DMA only for
disks" compile option), still the same half-hang.

BTW, the hang sector is different all the time - it varies from 980 to
3200 so far.

-- 
Meelis Roos (mroos@linux.ee)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 17:16       ` Meelis Roos
@ 2004-10-21 20:15         ` Jens Axboe
  2004-10-22  7:53           ` Meelis Roos
  2004-10-25 16:55           ` Meelis Roos
  0 siblings, 2 replies; 11+ messages in thread
From: Jens Axboe @ 2004-10-21 20:15 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list

On Thu, Oct 21 2004, Meelis Roos wrote:
> > Does 2.6.9 work if you turn off
> > dma first?
> 
> Turned DMA off with hdparm -d 0 /dev/hdc, still the same.
> Turned ATAPI DMA support off completely (activated "Use DMA only for
> disks" compile option), still the same half-hang.
> 
> BTW, the hang sector is different all the time - it varies from 980 to
> 3200 so far.

Can I talk you into trying to find out when this broke? You mention
2.4.18 as working, did 2.4.19 break? Narrowing this down as much as
possible would be very helpful.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 20:15         ` Jens Axboe
@ 2004-10-22  7:53           ` Meelis Roos
  2004-10-25 16:55           ` Meelis Roos
  1 sibling, 0 replies; 11+ messages in thread
From: Meelis Roos @ 2004-10-22  7:53 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linux Kernel list

> Can I talk you into trying to find out when this broke? You mention
> 2.4.18 as working, did 2.4.19 break? Narrowing this down as much as
> possible would be very helpful.

Might try on the weekend if I get time.

-- 
Meelis Roos (mroos@linux.ee)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-21 20:15         ` Jens Axboe
  2004-10-22  7:53           ` Meelis Roos
@ 2004-10-25 16:55           ` Meelis Roos
  2004-10-25 16:58             ` Jens Axboe
  1 sibling, 1 reply; 11+ messages in thread
From: Meelis Roos @ 2004-10-25 16:55 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linux Kernel list

> > Turned DMA off with hdparm -d 0 /dev/hdc, still the same.
> > Turned ATAPI DMA support off completely (activated "Use DMA only for
> > disks" compile option), still the same half-hang.
>
> Can I talk you into trying to find out when this broke? You mention
> 2.4.18 as working, did 2.4.19 break? Narrowing this down as much as
> possible would be very helpful.

OK, did some testing.

2.4.18, 2.4.19 and 2.4.20 are the same - mostly working. This means that
it reads non-broken data CD-s with DMA with no problems, but it loses an
interrupt and disables DMA with a faulty data CD (dmesg below).

The IDE changes in 2.4.21-pre1 cause DMA to fail at first read attempt
and all later kernels behave the same.

The dmesg from 2.4.18 in case of CD read error (with a known faulty cd):

hdc: command error: status=0x51 { DriveReady SeekComplete Error }
hdc: command error: error=0x54
end_request: I/O error, dev 16:00 (hdc), sector 1274020
ide_dmaproc: chipset supported ide_dma_lostirq func only: 13
hdc: lost interrupt
hdc: status timeout: status=0xd0 { Busy }
hdc: DMA disabled
hdc: drive not ready for command
hdc: ATAPI reset complete


-- 
Meelis Roos (mroos@linux.ee)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: readcd hangs in blk_execute_rq
  2004-10-25 16:55           ` Meelis Roos
@ 2004-10-25 16:58             ` Jens Axboe
  0 siblings, 0 replies; 11+ messages in thread
From: Jens Axboe @ 2004-10-25 16:58 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list, Alan Cox

On Mon, Oct 25 2004, Meelis Roos wrote:
> > > Turned DMA off with hdparm -d 0 /dev/hdc, still the same.
> > > Turned ATAPI DMA support off completely (activated "Use DMA only for
> > > disks" compile option), still the same half-hang.
> >
> > Can I talk you into trying to find out when this broke? You mention
> > 2.4.18 as working, did 2.4.19 break? Narrowing this down as much as
> > possible would be very helpful.
> 
> OK, did some testing.
> 
> 2.4.18, 2.4.19 and 2.4.20 are the same - mostly working. This means that
> it reads non-broken data CD-s with DMA with no problems, but it loses an
> interrupt and disables DMA with a faulty data CD (dmesg below).
> 
> The IDE changes in 2.4.21-pre1 cause DMA to fail at first read attempt
> and all later kernels behave the same.
> 
> The dmesg from 2.4.18 in case of CD read error (with a known faulty cd):
> 
> hdc: command error: status=0x51 { DriveReady SeekComplete Error }
> hdc: command error: error=0x54
> end_request: I/O error, dev 16:00 (hdc), sector 1274020
> ide_dmaproc: chipset supported ide_dma_lostirq func only: 13
> hdc: lost interrupt
> hdc: status timeout: status=0xd0 { Busy }
> hdc: DMA disabled
> hdc: drive not ready for command
> hdc: ATAPI reset complete

Alan, any ideas? IIRC, the 2.4.21-pre1 huge ide update is all your
doing.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-10-25 17:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-21 15:11 readcd hangs in blk_execute_rq Meelis Roos
2004-10-21 15:41 ` Jens Axboe
2004-10-21 15:47   ` Meelis Roos
2004-10-21 16:11     ` Jens Axboe
2004-10-21 16:19       ` Meelis Roos
2004-10-21 16:22         ` Jens Axboe
2004-10-21 17:16       ` Meelis Roos
2004-10-21 20:15         ` Jens Axboe
2004-10-22  7:53           ` Meelis Roos
2004-10-25 16:55           ` Meelis Roos
2004-10-25 16:58             ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox