kernel > 2.4.18 and problems with UDMA

From: Edek Kapustnik (edek_at_mam.dosc.spamu.com)
Date: 11/01/03


Date: Sat, 1 Nov 2003 21:15:26 +0000 (UTC)

Hi,
I'm fighting this problem for many weeks yet.
After long time running with kernel 2.4.5 I decided to upgrade it
to 2.4.21 version. Everything went ok with compilation but after
reboot something strange happened...
While booting, when system informed me by message "Partition check",
it seemed to freeze, but after some time (counted in seconds :) )
I got messages like these:

Partition check:
 hde:<4>hde: dma_timer_expiry: dma status == 0x21
hde: 0 bytes in FIFO
hde: dma timeout retry: status=0x80 { Busy }
hde: DMA disabled
ide2: reset: success

It was about 1-2 minute long delay after the first message.
After it, booting process continued with the same messages in every
moment when system tried to communicate with my hdd.
After all, system was started.

I have checked device reads:

hdparm -tT /dev/hde

and there is the result:
/dev/hde:
 Timing buffer-cache reads: 128 MB in 1.67 seconds = 76.65 MB/sec
 Timing buffered disk reads: 64 MB in 25.64 seconds = 2.50 MB/sec

2.50 MB/sec is not too fast, so I have tried to enable DMA (which
was disabled when system encountered problems with hdd):

# hdparm -d /dev/hde

and...

hde: dma_timer_expiry: dma status == 0x21
hde: 0 bytes in FIFO
hde: timeout waiting for DMA
hde: error waiting for DMA
hde: dma timeout retry: status=0x80 { Busy }

hde: DMA disabled
ide2: reset: success

My hdd is Seagate ST38410A (UDMA 66)
I have a Highpoint HPT 370 controller on motherboard (ABIT BE6-II).

I have tried to compile various kernels 2.4.18, 2.4.19, 2.4.20, 2.4.21
(recently I've tried 2.4.22 and 2.6.0-test[number]).
With kernel version 2.4.18 everything is ok, DMA is enabled. The same
with versions < 2.4.18. But if I boot 2.4.19 or higher, I have
problems as described above. Something was changed in kernel source
code between versions 2.4.18 and 2.4.19, what caused my problems.
I'm not familiar with drivers and C programming, so I can't say
what is it, and I don't know what kind of workaround is possible.

There is an output of 'hdparm -i /dev/hde' under working 2.4.18
kernel:

# hdparm -i /dev/hde

/dev/hde:

 Model=ST38410A, FwRev=3.32, SerialNo=5EG0WRFP
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=512kB, MaxMultSect=32, MultSect=off
 CurCHS=16383/16/63, CurSects=-66060037, LBA=yes, LBAsects=16841664
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4
 DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 *udma4
 AdvancedPM=yes: unknown setting
 Drive Supports : Reserved : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5

Perhaps here is somebody who will help me with that...

Edek



Relevant Pages

  • PROBLEM: ide-cd in 2.6.8-2.6.10 and 2.4.26-2.4.28 high cpu use with dma
    ... Burning cd's causes extremely high cpu use with dma enabled. ... Earlier kernel versions ... is shown as loaded in the environment section of this bug report since at ...
    (Linux-Kernel)
  • Re: Weird kernel errors
    ... This may be related to the kernel error message: ... >> The second is that my hard disks won't accept DMA enabling, ... No DMA on any of the drives. ... > allotted partitions if they aren't "right"). ...
    (uk.comp.os.linux)
  • Re: [PATCH] 2.6.22 - Documentation Cleanup
    ... The kernel provides an interface to manage DMA transfers ... - using the DMA channels in the cpu, ... channel generators is in one place. ...
    (Linux-Kernel)
  • Re: [PATCH] 2.6.22 - Documentation Cleanup
    ... The kernel provides an interface to manage DMA transfers ... - using the DMA channels in the cpu, ... channel generators is in one place. ...
    (Linux-Kernel)
  • Re: PATA DMA problem leading to kernel panic on reading movie DVDs
    ... DMA capabilities, leading either to DMA being disabled or a kernel ... It failed to indicate what the failed command was (though, it seems like the failed opcode is always unknown with the IDE drivers), disabled DMA incorrectly, then seemingly confused itself. ... The error message with 2.6.23.14 was: ...
    (Linux-Kernel)