# DMA + Serial ATA = No DMA on my HD :(

## bpoteet

Ok, so I'm about to jump off a cliff here.

I have a Gigabyte SINXP1394 w/ a SiS 655 P4 Chipset.  Running w/ P4 2.53 Ghz, 512MB Dual DDR 400, and the bane of my existence right now, the Silicon Image S-ATA controller w/ a Seagate SATA150 80G hard drive. 

I can get the controller working with gs-sources, ac-sources, devel-sources, & mm-sources.  Problem is, my HD won't switch to ANY transfer modes.  

hdparm -i /dev/hde 

tells me that I am in mdma0...yet when I try:

hdparm -d1 -X70 /dev/hde

my drive works fine for about 2 minutes, then just dies and starts giving me ext3 inode errors.  I have support for dma compiled in to all kernels I've tried, & siimage.o is compiled correctly.  I had to enable the "Ignore Word93 Validation" just to get the thing to quit giving me "hde:  lost interrupt" at boot.  When I boot, it mentions that my ide2 and ide3 are in "MMIO-DMA" mode instead of "BM-DMA".  I can't even switch to any pio modes either.  I've tried every hdparm combination I can think of.  If anyone has any ideas, please help, b/c I'm at my wits end.

BTW, DMA works fine w/ all my other devices.  

And I thought my Radeon 9500 w/ DRI was gonna be a pain....

PS: I'll post some output a little later when I get done with the yardwork...   :Confused: 

----------

## bpoteet

Here's the output I promised:

```
 

hdparm -iI /dev/hde

/dev/hde:

 Model=ST380023AS, FwRev=3.01, SerialNo=3KB13C9G

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 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 

 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 udma6 

 AdvancedPM=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:  1 2 3 4 5 6

ATA device, with non-removable media

        Model Number:       ST380023AS                              

        Serial Number:      3KB13C9G            

        Firmware Revision:  3.01    

Standards:

        Used: ATA/ATAPI-6 T13 1410D revision 2 

        Supported: 6 5 4 3 

Configuration:

        Logical         max     current

        cylinders       16383   16383

        heads           16      16

        sectors/track   63      63

        --

        CHS current addressable sectors:   16514064

        LBA    user addressable sectors:  156301488

        device size with M = 1024*1024:       76319 MBytes

        device size with M = 1000*1000:       80026 MBytes (80 GB)

Capabilities:

        LBA, IORDY(can be disabled)

        bytes avail on r/w long: 4      Queue depth: 1

        Standby timer values: spec'd by Standard

        R/W multiple sector transfer: Max = 16  Current = 16

        Recommended acoustic management value: 128, current value: 0

        DMA: *mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 udma6 

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4 

             Cycle time: no flow control=240ns  IORDY flow control=120ns

Commands/features:

        Enabled Supported:

           *    READ BUFFER cmd

           *    WRITE BUFFER cmd

           *    Host Protected Area feature set

           *    Look-ahead

           *    Write cache

           *    Power Management feature set

                Security Mode feature set

           *    SMART feature set

           *    Mandatory FLUSH CACHE command 

           *    Device Configuration Overlay feature set 

        Automatic Acoustic Management feature set 

                SET MAX security extension

           *    DOWNLOAD MICROCODE cmd

           *    SMART self-test 

           *    SMART error logging 

Security: 

                supported

        not     enabled

        not     locked

        not     frozen

        not     expired: security count

        not     supported: enhanced erase

HW reset results:

        CBLID- above Vih

        Device num = 0

Checksum: correct

```

and...

```

hdparm /dev/hde

/dev/hde:

 multcount    = 16 (on)

 IO_support   =  3 (32-bit w/sync)

 unmaskirq    =  1 (on)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    =  8 (on)

 geometry     = 9729/255/63, sectors = 156301488, start = 0

```

and the kicker.....

```

hdparm -tT /dev/hde

/dev/hde:

 Timing buffer-cache reads:   128 MB in  0.19 seconds =673.68 MB/sec

 Timing buffered disk reads:  64 MB in 17.39 seconds =  3.68 MB/sec

```

As I was saying....ugh.

----------

## bpoteet

Last call for help before I go back to my ata100 drive....anyone?

----------

## taskara

hmm... have you tried -X69 rather than -X70? - just to see if it will run at ata100?

I have a silicon controller, but no serial hdd.. so I can't help you much there I'm afraid.

What IS the correct -X setting for ata150 ? does hdparm even have one yet?

----------

## bpoteet

 *Quote:*   

> hmm... have you tried -X69 rather than -X70? - just to see if it will run at ata100? 

 

Yes.  I have tried all mdma, udma and pio modes.  It doesn't seem to help in the least, unfortunately.

 *Quote:*   

> What IS the correct -X setting for ata150 ? does hdparm even have one yet?

 

I don't think there is one.  It really doesn't matter though since bus throughput is limited to 133MB/s anyway.

----------

## taskara

true.

have you tried another file system? perhaps reiserfs?

I have had the "irq lost" message before, but I can't remember what the problem was, or how I fixed it.. so I'm not much help..

----------

## taskara

do you have plug n play turned OFF in your bios?

----------

## bpoteet

Yes.  I have tried different combinations of APIC on/off, PnP OS on/off, APC on/off, even tried assigning and reserving irq's....no dice.

----------

## taskara

hmmm.... I've just been searching through ww.google.com/linux for you, and I can't seem to find any answers.

surely someone out there has used this controller already!

I'm sorry.. short of getting a serial hdd myself and trying it, I don't think I'll be much help..

if I can only remember how i fixed the irq lost error last time..

----------

## Tarball

Just clutching at straws here but have you checked cat /proc/interrupts to see whether your controller is sharing an IRQ with another device which maybe causing problems?

Just a thought

----------

## Gelfling

What kernel are you using? As far as I know, SATA drivers currently available don't yet support DMA. If you want DMA, stick with drives connected to the regular ide connectors. Or wait until DMA makes it into the SATA drivers. 

I just installed a SINXP1394 in my linux box and the current Gentoo installation I have is flakey as hell with the mb. When I get home tonight I'll re-install the OS.

----------

## MarkG

I've just stopped using the linux-2.4.21_pre7-gss kernel with Silicon Image chipset support as I was getting disk corruption. I don't have a SATA controller but a UltraATA-133 controller based on the Silicon Image sil0680 chipset. The interesting point is that it's the same kernel option to enable SATA support and I'm also using a Seagate disk.

CONFIG_BLK_DEV_SIIMAGE:

This driver provides (U)DMA support for the SII3112 SATA controllers and for the CMD/SI680 UDMA/DMA ATA controller. 

Could there be a more general problem with this driver?

MarkG

----------

## Odin

2.4.21_pre7-gss are working great here, Sil680 + Seagate Barracude IV 80gb and Maxtor DiamondMax Plus 30gb. Combination of ReiserFS, Ext2, and vfat paritions on the two.

Didn't really have to do anything special to get it to work.

I know thats really not much help... but maybe it'll narrow things down a bit.  :Smile: 

----------

## taskara

what's hdparm -tT /dev/hdx reveal?

----------

