2001-11-09 02:18:22

by Richard Gooch

[permalink] [raw]
Subject: Lockup in IDE code

Hi, all. I tried to use my IDE CD-ROM today, the first time in a
long while. When attempting to mount it, the machine locked up,
hard. Even SysReq didn't work. I got the following message:

hdb: timeout waiting for DMA
ide_dmaproc: chipset supported ide_dma_timeout func only: 14

I was running 2.4.7 initially, and then pulled down 2.4.14 and got the
same problem. All my IDE drivers are loadable modules. The kernel
messages I get when I load those modules are appended. If I turn off
DMA using hdparm, I don't get a lockup.

This wasn't always a problem. The last time I used my CD-ROM it worked
fine. My motherboard is an Asus P2B-D (dual PIII).

Regards,

Richard....
Permanent: [email protected]
Current: [email protected]
===============================================================================
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 21
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:pio, hdb:DMA
ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:pio, hdd:pio
hdb: CRD-8480B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdb: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
hdb: set_drive_speed_status: error=0xb4
hdb: ATAPI 48X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12


2001-11-09 09:52:26

by Xavier Bestel

[permalink] [raw]
Subject: Re: Lockup in IDE code

le ven 09-11-2001 ? 03:17, Richard Gooch a ?crit :
> Hi, all. I tried to use my IDE CD-ROM today, the first time in a
> long while. When attempting to mount it, the machine locked up,
> hard. Even SysReq didn't work.

Do you have a read error on your CD ?


2001-11-09 16:57:31

by Richard Gooch

[permalink] [raw]
Subject: Re: Lockup in IDE code

GXavier Bestel writes:
> le ven 09-11-2001 ? 03:17, Richard Gooch a ?crit :
> > Hi, all. I tried to use my IDE CD-ROM today, the first time in a
> > long while. When attempting to mount it, the machine locked up,
> > hard. Even SysReq didn't work.
>
> Do you have a read error on your CD ?

No. I did mention that when I turned off DMA, it worked fine.

BTW: I've gotten a few "helpful" responses saying "try using hdparm to
turn off DMA". Well, those people obviously hadn't bothered reading
all my message, because I stated that when I disabled DMA with hdparm,
it worked fine.
</grumble>

Regards,

Richard....
Permanent: [email protected]
Current: [email protected]

2001-11-09 19:39:49

by Dan Hollis

[permalink] [raw]
Subject: Re: Lockup in IDE code

On Fri, 9 Nov 2001, Richard Gooch wrote:
> GXavier Bestel writes:
> > le ven 09-11-2001 ? 03:17, Richard Gooch a ?crit :
> > > Hi, all. I tried to use my IDE CD-ROM today, the first time in a
> > > long while. When attempting to mount it, the machine locked up,
> > > hard. Even SysReq didn't work.
> > Do you have a read error on your CD ?
> No. I did mention that when I turned off DMA, it worked fine.

I don't see why read errors should lock up the kernel anyway... would it
be acceptable for floppy read errors to lock up the kernel too?

-Dan
--
[-] Omae no subete no kichi wa ore no mono da. [-]

2001-11-09 19:42:09

by Mark Zealey

[permalink] [raw]
Subject: Re: Lockup in IDE code

On Fri, Nov 09, 2001 at 09:56:54AM -0700, Richard Gooch wrote:

> GXavier Bestel writes:
> > le ven 09-11-2001 ? 03:17, Richard Gooch a ?crit :
> > > Hi, all. I tried to use my IDE CD-ROM today, the first time in a
> > > long while. When attempting to mount it, the machine locked up,
> > > hard. Even SysReq didn't work.
> >
> > Do you have a read error on your CD ?
>
> No. I did mention that when I turned off DMA, it worked fine.
>
> BTW: I've gotten a few "helpful" responses saying "try using hdparm to
> turn off DMA". Well, those people obviously hadn't bothered reading
> all my message, because I stated that when I disabled DMA with hdparm,
> it worked fine.
> </grumble>

Well, obviously your drive or mobo doesn't support DMA. I noticed that all the
other devices (hd[acd]) were in PIO mode, why not try setting dma mode on one of
them. Most CD's I've come across don't do DMA very well, I believe that the DMA
is mostly only useful for DVD's, where you need a high transfer rate to watch a
movie.

--

Mark Zealey
[email protected]
[email protected]

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a16! C++++>$ P++++>+++++$ L+++>+++++$
!E---? W+++>$ N- !o? !w--- O? !M? !V? !PS !PE--@ PGP+? r++ !t---?@ !X---?
!R- b+ !tv b+ DI+ D+? G+++ e>+++++ !h++* r!-- y--

(http://www.geekcode.com)

2001-11-09 19:59:39

by Xavier Bestel

[permalink] [raw]
Subject: Re: Lockup in IDE code

le ven 09-11-2001 ? 20:38, Dan Hollis a ?crit :
> On Fri, 9 Nov 2001, Richard Gooch wrote:
> > GXavier Bestel writes:
> > > le ven 09-11-2001 ? 03:17, Richard Gooch a ?crit :
> > > > Hi, all. I tried to use my IDE CD-ROM today, the first time in a
> > > > long while. When attempting to mount it, the machine locked up,
> > > > hard. Even SysReq didn't work.
> > > Do you have a read error on your CD ?
> > No. I did mention that when I turned off DMA, it worked fine.
>
> I don't see why read errors should lock up the kernel anyway... would it
> be acceptable for floppy read errors to lock up the kernel too?

Indeed, but they do, on my machine anyway.

Xav

2001-11-10 13:20:58

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: Lockup in IDE code

Mark Zealey - 2001-11-09 12:40:41 PST
>Well, obviously your drive or mobo doesn't support DMA. I noticed that all
>the other devices (hd[acd]) were in PIO mode, why not try setting dma mode
>on one of them. Most CD's I've come across don't do DMA very well, I believe
>that the DMA is mostly only useful for DVD's, where you need a high transfer
>rate to watch a movie.

He probably doesn't have anything on the primary master and seconday
master/slaves. And UDMA has worked very well for most CDROM drives i've come
across, but then as always YMMV.

Cheers,
Zwane

2001-11-10 13:34:59

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: Lockup in IDE code


Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 21
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:pio, hdb:DMA
ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:pio, hdd:pio
hdb: CRD-8480B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

He only has the one device on IDE as you can see that the probe only shows
hdb, and i have a PIIX4 too and they do UDMA33 well enough, in fact i'm not
aware of any DMA problems with the PIIX4. Richard, have you tried disabling
CONFIG_IDEDMA_AUTO and CONFIG_PIIX_TUNING ?

But looking at the code in ide-features.c it doesn't look like we have
enabled DMA by the time we get to that code.

if (error) {
(void) ide_dump_status(drive, "set_drive_speed_status", stat);
return error;
}

<----- snip ----- >
#if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI)
if (speed > XFER_PIO_4) {
outb(inb(hwif->dma_base+2)|(1<<(5+unit)), hwif->dma_base+2);
} else {
outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)),
hwif->dma_base+2);
}
#endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */

But bear in mind i'm far from being remotely knowledgeable about this
specific code ;)

2001-11-16 07:07:48

by Ph. Marek

[permalink] [raw]
Subject: Re: Lockup in IDE code

I've had the same problem.

Lockups with 2.4.14pre1 + ext3-patch, sysrq not possible, HD led is on.

This is a 7IXE4 (AMD756), Duron 650, 384MB. 2 HD's, 1 CDROM.


I've noted that on startup I got "spurious 8259A interrupt: IRQ7", and the
machine locked hard on IDE activity (sometimes).
after observing the above message and others like
hda: timeout waiting for DMA
ide_dmaproc: chipset supported ide_dma timeoutfunc only: 14
hda: read_intr: status=0x51
hda: read_intr: status=0x04
hda: read_intr: status=0x51
hda: read_intr: status=0x04
hda: read_intr: status=0x51
hda: read_intr: status=0x04
ide0: reset: success

The I've tested disabling some options.
So far my best result was disabling APIC on UP (both - IOAPIC and APIC) -
so far I've had no more lockups.

Will test further, but this seemed to be the problem for me.


Regards,

Phil


-
This message is RSA-encrypted: n=33389, e=257