Severe IDE BM-DMA problems.

Erik Arjan Hendriks (hendriks@cesdis1.gsfc.nasa.gov)
Thu, 5 Nov 1998 17:08:06 -0500 (EST)


Hi,
BM-IDE doesn't work for me on all recent (at least these kernels
2.1.119-2.1.127p3). The kernel either fails and returns to PIO mode
or crashes depending on which interface I'm playing with.

The motherboard I'm using is an Intel PR440FX Motherboard (PIIX3, dual
cpu but only 1 installed, onboard SCSI and fast ethernet) with 64MB
RAM installed.

# uname -a
Linux test 2.1.127 #2 SMP Mon Oct 26 13:04:27 EST 1998 i686 unknown
(It's 2.1.127-pre3, but I get exactly the same thing with 2.1.126)

>From kernel startup:

PIIX3: IDE controller on PCI bus 00 dev 39
PIIX3: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xff60-0xff67, BIOS settings: hda:DMA, hdb:pio
PDC20246: IDE controller on PCI bus 00 dev 98
PDC20246: not 100% native mode: will probe irqs later
PDC20246: ROM enabled but no address
ide2: BM-DMA at 0xff80-0xff87, BIOS settings: hde:DMA, hdf:pio
ide3: BM-DMA at 0xff88-0xff8f, BIOS settings: hdg:pio, hdh:DMA

hda: ST36450A, ATA DISK drive
hde: IBM-DHEA-38451, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide2 at 0xfff0-0xfff7,0xffe6 on irq 19
hda: ST36450A, 6149MB w/448kB Cache, CHS=784/255/63
hde: IBM-DHEA-38451, 8047MB w/472kB Cache, CHS=16351/16/63

Partition check:
hda: hda1 hda2 hda3 hda4
hde: hde1

The root filesystem lives here:

(scsi0) <Adaptec AIC-7880 Ultra SCSI host adapter> found at PCI 9/0
(scsi0) Wide Channel, SCSI ID=7, 16/255 SCBs
(scsi0) Downloading sequencer code... 419 instructions downloaded
scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.1.2/3.2.4
<Adaptec AIC-7880 Ultra SCSI host adapter>
scsi : 1 host.
Vendor: SEAGATE Model: ST15150W Rev: 0023
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sda at scsi0, channel 0, id 1, lun 0
(scsi0:0:1:0) Synchronous at 10.0 Mbyte/sec, offset 15.
SCSI device sda: hdwr sector= 512 bytes. Sectors= 8388315 [4095 MB] [4.1 GB]
sda: sda1 sda2

This hardware works fine with BM-DMA under 2.0.35. It also works ok
in PIO mode on 2.1.x. (I haven't used the promise card under 2.0.35
for other reasons.) The kernel is built with CONFIG_IDEDMA_AUTO
turned off in order to get past the initial partition check w/o
crashing.

How I illict the problem:
For both of these disks, I enabled DMA using hdparm and attempted to
read a block with "dd".

with hda:
# hdparm -d1 /dev/hda

/dev/hda:
setting using_dma to 1 (on)
using_dma = 1 (on)
# dd if=/dev/hda of=/dev/null count=1 bs=1k

** System crash **

There's no detectable life at all. No console messages, not pingable,
console is dead. Completely hung. This happens immediately.
(I.e. no delay like waiting for the timeout when DMA fails.)

with hde:
# hdparm -d1 /dev/hde

/dev/hde:
setting using_dma to 1 (on)
using_dma = 1 (on)
# dd if=/dev/hde of=/dev/null count=1 bs=1k

This hangs for a while but eventually succeeds and the following
appears in the logs:

hde: timeout waiting for DMA
hde: irq timeout: status=0x00 { }
hde: status error: status=0x00 { }
hde: drive not ready for command
hde: status error: status=0x00 { }
hde: drive not ready for command
hde: status error: status=0x00 { }
hde: DMA disabled
hde: drive not ready for command
ide2: reset: success

I've attempted explicitly setting transfer modes (-X34 on hdparm) but
that doesn't make any difference. This behavior is not a fluke. It
can be replicated 100% of the time. I was gonna try this with
2.1.127p7 but the Adaptec SCSI driver seems to be broken again in that
version. *sigh*

Thanks,
Erik

P.S. I have tried different boards, disks, etc.

------------------------------------------------------------
Erik Hendriks
hendriks@cesdis.gsfc.nasa.gov

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/