2.1.102, IDE DMA and OPTi 82C621

Trevor Johnson (trevor@jpj.net)
Sun, 17 May 1998 16:40:03 -0400 (EDT)


I have a PC with an Amptron PM-7400 motherboard. The OPTi 82C621 chip is
built onto it. According to the author of the Linux driver for this chip,
it does not support IDE DMA. I compiled Linux 2.1.102 with
CONFIG_BLK_DEV_IDEDMA=y (full kernel configuration is at
http://jpj.net/~trevor/linux/config-2.1.102-topside) in the hope that the
new IDE code is more graceful than earlier versions about recognizing that
DMA won't work with this chip. It isn't. I got these messages
(accompanied by a pause while printing the second line) while booting:

Partition check:
hda: hda1 hda2 < hda5 hda6 hda7 hda8 > hda3 hda4 < hda9 >
hdc:hdc: timeout waiting for DMA
hdc: irq timeout: status=0x50 { DriveReady SeekComplete }
hdc: timeout waiting for DMA
hdc: irq timeout: status=0x50 { DriveReady SeekComplete }
hdc: timeout waiting for DMA
hdc: irq timeout: status=0x50 { DriveReady SeekComplete }
hdc: timeout waiting for DMA
hdc: irq timeout: status=0x50 { DriveReady SeekComplete }
hdc: DMA disabled
ide1: reset: success
[PTBL] [621/64/63] hdc1 hdc2 hdc3 hdc4

Notice that there are no warnings about hda.

I tried turning on DMA manually, using hdparm 3.1, and didn't receive any
error:

# hdparm -X34 -d1 /dev/hda;hdparm -X34 -d1 /dev/hdc

/dev/hda:
setting using_dma to 1 (on)
setting xfermode to 34 (multiword DMA mode2)
using_dma = 1 (on)

/dev/hdc:
setting using_dma to 1 (on)
setting xfermode to 34 (multiword DMA mode2)
using_dma = 1 (on)

However, these errors were logged a few seconds later:

May 17 13:19:00 topside kernel: hdc: timeout waiting for DMA
May 17 13:19:00 topside kernel: hdc: irq timeout: status=0x50 { DriveReady
SeekComplete }
May 17 13:19:10 topside kernel: hdc: timeout waiting for DMA
May 17 13:19:10 topside kernel: hdc: irq timeout: status=0x50 { DriveReady
SeekComplete }
May 17 13:19:20 topside kernel: hdc: timeout waiting for DMA
May 17 13:19:20 topside kernel: hdc: irq timeout: status=0x50 { DriveReady
SeekComplete }
May 17 13:19:30 topside kernel: hdc: timeout waiting for DMA
May 17 13:19:30 topside kernel: hdc: irq timeout: status=0x50 { DriveReady
SeekComplete }
May 17 13:19:30 topside kernel: hdc: DMA disabled
May 17 13:19:30 topside kernel: ide1: reset: success

# hdparm -i /dev/hda /dev/hdc

/dev/hda:

Model=Maxtor 72004 AP, FwRev=2A3C0B31, SerialNo=S209L3ES
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>5Mbs FmtGapReq }
RawCHS=3893/16/63, TrkSize=0, SectSize=0, ECCbytes=34
BuffType=3(DualPortCache), BuffSize=128kB, MaxMultSect=32, MultSect=off
DblWordIO=yes, maxPIO=2(fast), DMA=yes, maxDMA=1(medium)
CurCHS=3893/16/63, CurSects=3924144, LBA=yes, LBAsects=3924360
tDMA={min:120,rec:120}, DMA modes: sword0 sword1 *sword2 mword0 mword1
*mword2
IORDY=on/off, tPIO={min:180,w/IORDY:120}, PIO modes: mode3 mode4

/dev/hdc:

Model=QUANTUM FIREBALL1280A, FwRev=A63.0E00, SerialNo=82260824
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=2484/16/63, TrkSize=32256, SectSize=512, ECCbytes=4
BuffType=3(DualPortCache), BuffSize=83kB, MaxMultSect=8, MultSect=off
DblWordIO=no, maxPIO=2(fast), DMA=yes, maxDMA=2(fast)
CurCHS=2484/16/63, CurSects=2503872, LBA=yes, LBAsects=2503872
tDMA={min:120,rec:120}, DMA modes: sword0 sword1 sword2 mword0 mword1
*mword2
IORDY=on/off, tPIO={min:333,w/IORDY:120}, PIO modes: mode3 mode4

# hdparm -d /dev/hda /dev/hdc

/dev/hda:
using_dma = 1 (on)

/dev/hdc:
using_dma = 0 (off)
# hdparm -d1 /dev/hda /dev/hdc

/dev/hda:
setting using_dma to 1 (on)
using_dma = 1 (on)

/dev/hdc:
setting using_dma to 1 (on)
using_dma = 1 (on)
# hdparm -d /dev/hda /dev/hdc

/dev/hda:
using_dma = 1 (on)

/dev/hdc:
using_dma = 1 (on)

# ./lspci -i ./pci.ids -vv
00:00.0 Host bridge: OPTi Inc. 82C557 [Viper-M] (rev 15)
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 0 set

00:01.0 ISA bridge: OPTi Inc. 82C558 [Viper-M ISA+IDE] (rev 11)
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR+
Latency: 0 set

00:11.0 Ethernet controller: Realtek Semiconductor Co., Ltd. 8029
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 11
Region 0: I/O ports at 6000

00:14.0 IDE interface: OPTi Inc. 82C621 (rev 11) (prog-if 80)
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 0 set
Region 4: I/O ports at 3000
___
Trevor Johnson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu