# dma trouble

## jonas_nilsson

I am experiencing difficulties enabling DMA for my hdd in Linux. The computer is a laptop, a Compaq Presario 907EA. Most stuff works fine (but of course not that awful Radeon Mobility U1). Have a look at this message:

```
bash-2.05b# hdparm -d1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

bash-2.05b#
```

From checking out the forum, I've found that this error message is not unique. However, I've not found any solution to the problem either. Here's some relevant lspci info:

```
bash-2.05b# lspci |grep IDE

00:10.0 IDE interface: ALi Corporation M5229 IDE (rev c4)

```

I've checked out my kernel config, and I've got generic IDE chipset support enabled, as well as "DMA when available". I have not been able to find any specific module for my IDE chipset.

So, does anyone have any idea what to try next? Has anyone been succesful? If so, tell me what to do!

----------

## Yuber

fucking BUMP.

----------

## Muddy

I'm getting the same garbage, re-compiled my kernel with the correct via chipset support and it's still not working.

```
# hdparm -d 1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

I'm coming up empty on searches as well.

Anyone?

*note* in case it matters it's a tyan S1834D mobo with the via apollo pro 133 chipset and all drives are ata100 7200rpm.

----------

## Muddy

I'm using GS-Sources if that makes any diff.

Should I try the Vanilla sources?

----------

## Jerri

Muddy, you can try using Vanilla sources, whether that will make a difference is doubtfull, however, it is the most stable kenel of the lot.

how about posting your kernel config.

----------

## Muddy

tried man, but now after making sure everything is in my config it fails on make modules_install

----------

## Muddy

Well my make modules_install still stops running after the pcmcia stuff but I copied my kernel booted off it anyways as the modules I need it made and the don't appear affected by that. Running full dma now yea!

# hdparm -tT /dev/hdc

/dev/hdc:

 Timing buffer-cache reads:   312 MB in  2.00 seconds = 156.00 MB/sec

 Timing buffered disk reads:   62 MB in  3.06 seconds =  20.26 MB/sec

much better now   :Smile: 

----------

## mog

I have the same problem   :Shocked:   ...  generic ide support, dma enabled ... etc ... well still not working ...   :Crying or Very sad: 

would you mind to share what the modifications you made to the kernel config were

----------

## russryder

bump agin....HELP this is way to slow!!

```

russbox root # hdparm -X69 -d1 -u1 -m16 -c1 -A1 -a16 /dev/hdc

 

/dev/hdc:

 setting fs readahead to 16

 setting 32-bit IO_support flag to 1

 setting multcount to 16

 HDIO_SET_MULTCOUNT failed: Invalid argument

 setting unmaskirq to 1 (on)

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 setting xfermode to 69 (UltraDMA mode5)

 setting drive read-lookahead to 1 (on)

 HDIO_DRIVE_CMD(setreadahead) failed: Input/output error

 HDIO_GET_MULTCOUNT failed: Invalid argument

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  0 (off)

 readahead    = 16 (on)

```

here is my lspci

```

00:00.0 Host bridge: nVidia Corporation nForce2 AGP (different version?) (rev a2)

00:00.1 RAM memory: nVidia Corporation nForce2 Memory Controller 1 (rev a2)

00:00.2 RAM memory: nVidia Corporation nForce2 Memory Controller 4 (rev a2)

00:00.3 RAM memory: nVidia Corporation nForce2 Memory Controller 3 (rev a2)

00:00.4 RAM memory: nVidia Corporation nForce2 Memory Controller 2 (rev a2)

00:00.5 RAM memory: nVidia Corporation nForce2 Memory Controller 5 (rev a2)

00:01.0 ISA bridge: nVidia Corporation nForce2 ISA Bridge (rev a3)

00:01.1 SMBus: nVidia Corporation nForce2 SMBus (MCP) (rev a2)

00:02.0 USB Controller: nVidia Corporation nForce2 USB Controller (rev a3)

00:02.1 USB Controller: nVidia Corporation nForce2 USB Controller (rev a3)

00:02.2 USB Controller: nVidia Corporation nForce2 USB Controller (rev a3)

00:04.0 Ethernet controller: nVidia Corporation nForce2 Ethernet Controller (rev a1)

00:08.0 PCI bridge: nVidia Corporation nForce2 External PCI Bridge (rev a3)

00:09.0 IDE interface: nVidia Corporation nForce2 IDE (rev a2)

00:0d.0 FireWire (IEEE 1394): nVidia Corporation nForce2 FireWire (IEEE 1394) Controller (rev a3)

00:1e.0 PCI bridge: nVidia Corporation nForce2 AGP (rev a2)

01:08.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 04)

03:00.0 VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX - nForce GPU] (rev a3)

```

I compiled support for my nvidia chipset and dma still will not turn on!!!!

I have 2.6.1 installed and I'm wondering if anyone else with a nvidia chipset has 2.6.1 and dma enabled

edit: I do not have generic ide support enabled.  Is this bad?  I wouldn't think it's a problem considering I have compiled the support for my chipset in, but I've seen a lot of people have this enabled.  Is that required for dma in 2.6.1?

----------

## labrador

The option is buried in make menuconfig if that is what you are using.

For nvidia nforce 2, and 2.6.1:

Device Drivers ->

     ATA/ATAPI/MFM/RLL Support ->

         PCI IDE Chipset Support  ->    (expands submenu)

              Generic PCI bus-master DMA Support -> (expands submenu)

                   AMD and Nvidia IDE Support

I have not tried it yet, but since KNOPPIX boot CD does turn on DMA

without a hitch, and I was missing the above, I'm certain this is the issue.

I didn't look there before because nForce is not on a PCI card, but I suppose

they regard the mobo chipsets as being part of the PCI bus.

For the non-nVidia nForce users, I'm sure you'll find your chipset in the same zone.

----------

## mog

well, I solved the problem. I changed to the XFS sources after noticing that the Gentoo LiveCD worked fine and UDMA was enabled properly. 

The XFS worked out the box with the same generic PCI chipset settings. Funny that   :Very Happy:   ... hope it helps.

----------

