# Activating DMA on Gentoo with kernel 2.6.8

## quirkie0

Hello folks, 

I've trouble activating DMA on my Gentoo freshly updated to kernel 2.6.8. I made a search on this board and I found some tips, but in fact everything's done on my system to work fine !

I have a nForce chipset on the motherboard, which I activate as AMD and nVidia IDE support (compiled into the kernel), but as I reboot the system, I still have the ugly message DMA isn't active (and the bad performances). 

I can't set up DMA via hdparm: it tells me 

```
HDIO_SET_DMA failed: Operation not permitted
```

So I'm a little bit frustrated because it worked fine with the 2.6.7 kernel (but now USB works, so I'm not SO frustrated  :Wink: )

Does anybody have an idea on how to activate dma here ?  :Very Happy:  [/i]

----------

## Highlands

try to activate this in the kernel, worked for me

```

Device Drivers  ---> / ATA/ATAPI/MFM/RLL support  ---> /  VIA82CXXX chipset support

```

----------

## quirkie0

Humm it doesn't work...

I hope it's not another bug into the Gentoo kernel... I upgraded from 2.6.7 to have USB working, well yes now it works, but it's slow  :Sad: 

Any other idea ?

----------

## dalamarian

please post your kernel config file.  might lead to an answer quicker

----------

## quirkie0

Here it is:

http://members.chello.be/cr26776/linux/boot.txt

----------

## solatis

It looks like I'm having the exact same problem... nForce chipset, enabled in the kernel (2.6.9), and DMA doesn't work.

I'm trying to figure out wether the livecd is able to do DMA with my chipset, and if so, which module is being used.

----------

## quirkie0

With the live cd, no problem here. I just have to type hdparm -d1 /dev/hdc and the DMA is activated (it's livecd 2004.2)

And the first installation with kernel gentoo-dev-sources 2.6.7 was OK with DMA. It was USB which was not running (doh!).

Well, I hope somebody will be able to help us !

----------

## solatis

Indeed, but at the boot time, it says 

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

I'm not sure, but this doesn't look good either... the livecd kernel tells a whole story about nForce and the like at boot time, my 'own' kernel won't do that.  :Sad: 

----------

## quirkie0

I have the same message with dmesg. And the only moment it talks about DMA is:

```
  DMA zone: 4096 pages, LIFO batch:1
```

Not clear...

Oh Linux god, please help us   :Very Happy: 

----------

## solatis

Ok, I've got it working by doing the extreme: enable all chipsets.

I'm going to deactivate them one-by-one to find out which one it is. I'll keep you informed.

----------

## solatis

Ugh... this makes no sense... I've disabled all of them except the nForce one and it still works! 

Anyway, I suggest you try a similar approach  :Smile: 

----------

## quirkie0

 :Laughing:  Indeed it's the best method to get a good result  :Wink: 

I'm going to try when possible, thanks for the tip!!!

----------

## quirkie0

by the way, did you compile the features directly into the kernel or just as module ? That's a critical point :d

thanks

----------

## solatis

 *quirkie0 wrote:*   

> by the way, did you compile the features directly into the kernel or just as module ? That's a critical point :d
> 
> thanks

 

Directly into the kernel

----------

## 870Fragmaster

I am also having problems enabling dma on an nforce board. I have built into the kernel every ide driver i can find and no dice  :Sad:  Here is an output of my /proc/pci to show what hardware I have

```
cat /proc/pci

PCI devices found:

  Bus  0, device   0, function  0:

    Host bridge: nVidia Corporation nForce2 AGP (different version?) (rev 193).

      Prefetchable 32 bit memory at 0xd8000000 [0xdbffffff].

  Bus  0, device   0, function  1:

    RAM memory: nVidia Corporation nForce2 Memory Controller 1 (rev 193).

  Bus  0, device   0, function  2:

    RAM memory: nVidia Corporation nForce2 Memory Controller 4 (rev 193).

  Bus  0, device   0, function  3:

    RAM memory: nVidia Corporation nForce2 Memory Controller 3 (rev 193).

  Bus  0, device   0, function  4:

    RAM memory: nVidia Corporation nForce2 Memory Controller 2 (rev 193).

  Bus  0, device   0, function  5:

    RAM memory: nVidia Corporation nForce2 Memory Controller 5 (rev 193).

  Bus  0, device   1, function  0:

    ISA bridge: nVidia Corporation nForce2 ISA Bridge (rev 164).

  Bus  0, device   1, function  1:

    SMBus: nVidia Corporation nForce2 SMBus (MCP) (rev 162).

      IRQ 10.

      Master Capable.  No bursts.  Min Gnt=3.Max Lat=1.

      I/O at 0xc800 [0xc81f].

  Bus  0, device   2, function  0:

    USB Controller: nVidia Corporation nForce2 USB Controller (rev 164).

      IRQ 11.

      Master Capable.  No bursts.  Min Gnt=3.Max Lat=1.

      Non-prefetchable 32 bit memory at 0xe0001000 [0xe0001fff].

  Bus  0, device   2, function  1:

    USB Controller: nVidia Corporation nForce2 USB Controller (#2) (rev 164).

      IRQ 5.

      Master Capable.  No bursts.  Min Gnt=3.Max Lat=1.

      Non-prefetchable 32 bit memory at 0xe0004000 [0xe0004fff].

  Bus  0, device   2, function  2:

    USB Controller: nVidia Corporation nForce2 USB Controller (rev 164).

      IRQ 10.

      Master Capable.  No bursts.  Min Gnt=3.Max Lat=1.

      Non-prefetchable 32 bit memory at 0xe0005000 [0xe00050ff].

  Bus  0, device   8, function  0:

    PCI bridge: nVidia Corporation nForce2 External PCI Bridge (rev 163).

      Master Capable.  No bursts.  Min Gnt=2.Max Lat=2.

  Bus  0, device   9, function  0:

    IDE interface: nVidia Corporation nForce2 IDE (rev 162).

      Master Capable.  No bursts.  Min Gnt=3.Max Lat=1.

      I/O at 0xf000 [0xf00f].

  Bus  0, device  13, function  0:

    FireWire (IEEE 1394): nVidia Corporation nForce2 FireWire (IEEE 1394) Controller (rev 163).

      IRQ 11.

      Master Capable.  No bursts.  Min Gnt=3.Max Lat=1.

      Non-prefetchable 32 bit memory at 0xe0002000 [0xe00027ff].

      Non-prefetchable 32 bit memory at 0xe0003000 [0xe000303f].

  Bus  0, device  30, function  0:

    PCI bridge: nVidia Corporation nForce2 AGP (rev 193).

      Master Capable.  Latency=32.  Min Gnt=10.

  Bus  1, device   7, function  0:

    Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 8).

      IRQ 10.

      Master Capable.  Latency=32.  Min Gnt=2.Max Lat=20.

      I/O at 0x9000 [0x901f].

  Bus  1, device   7, function  1:

    Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 8).

      Master Capable.  Latency=32.

      I/O at 0x9400 [0x9407].

  Bus  1, device   9, function  0:

    Modem: Lucent Microelectronics Venus Modem (V90, 56KFlex) (rev 0).

      IRQ 5.

      Master Capable.  No bursts.  Min Gnt=252.Max Lat=14.

      Non-prefetchable 32 bit memory at 0xdf001000 [0xdf0010ff].

      I/O at 0x9800 [0x98ff].

      I/O at 0x9c00 [0x9cff].

      I/O at 0xa000 [0xa007].

  Bus  1, device  10, function  0:

    Ethernet controller: Lite-On Communications Inc LNE100TX (rev 32).

      IRQ 11.

      Master Capable.  Latency=32.

      I/O at 0xa400 [0xa4ff].

      Non-prefetchable 32 bit memory at 0xdf000000 [0xdf0000ff].

  Bus  1, device  11, function  0:

    RAID bus controller: Silicon Image, Inc. (formerly CMD Technology Inc) SiI 3112 (rev 2).

      IRQ 11.

      Master Capable.  Latency=32.

      I/O at 0xa800 [0xa807].

      I/O at 0xac00 [0xac03].

      I/O at 0xb000 [0xb007].

      I/O at 0xb400 [0xb403].

      I/O at 0xb800 [0xb80f].

      Non-prefetchable 32 bit memory at 0xdf002000 [0xdf0021ff].

  Bus  2, device   0, function  0:

    VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX 4000 AGP 8x] (rev 193).

      IRQ 10.

      Master Capable.  Latency=248.  Min Gnt=5.Max Lat=1.

      Non-prefetchable 32 bit memory at 0xdc000000 [0xdcffffff].

      Prefetchable 32 bit memory at 0xd0000000 [0xd7ffffff].

```

and also the IDE section of my kernel config

```
#

# ATA/ATAPI/MFM/RLL support

#

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

#

# Please see Documentation/ide.txt for help/info on IDE drives

#

# CONFIG_BLK_DEV_IDE_SATA is not set

# CONFIG_BLK_DEV_HD_IDE is not set

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_IDEDISK_MULTI_MODE=y

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

# CONFIG_BLK_DEV_IDEFLOPPY is not set

CONFIG_BLK_DEV_IDESCSI=m

# CONFIG_IDE_TASK_IOCTL is not set

CONFIG_IDE_TASKFILE_IO=y

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

# CONFIG_BLK_DEV_CMD640_ENHANCED is not set

# CONFIG_BLK_DEV_IDEPNP is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

# CONFIG_BLK_DEV_OFFBOARD is not set

CONFIG_BLK_DEV_GENERIC=y

# CONFIG_BLK_DEV_OPTI621 is not set

CONFIG_BLK_DEV_RZ1000=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

CONFIG_BLK_DEV_AEC62XX=y

CONFIG_BLK_DEV_ALI15X3=y

# CONFIG_WDC_ALI15X3 is not set

CONFIG_BLK_DEV_AMD74XX=y

CONFIG_BLK_DEV_ATIIXP=y

CONFIG_BLK_DEV_CMD64X=y

CONFIG_BLK_DEV_TRIFLEX=y

CONFIG_BLK_DEV_CY82C693=y

CONFIG_BLK_DEV_CS5520=y

CONFIG_BLK_DEV_CS5530=y

CONFIG_BLK_DEV_HPT34X=y

CONFIG_HPT34X_AUTODMA=y

CONFIG_BLK_DEV_HPT366=y

CONFIG_BLK_DEV_SC1200=y

CONFIG_BLK_DEV_PIIX=y

CONFIG_BLK_DEV_NS87415=y

CONFIG_BLK_DEV_PDC202XX_OLD=y

CONFIG_PDC202XX_BURST=y

CONFIG_BLK_DEV_PDC202XX_NEW=y

# CONFIG_PDC202XX_FORCE is not set

CONFIG_BLK_DEV_SVWKS=y

CONFIG_BLK_DEV_SIIMAGE=y

CONFIG_BLK_DEV_SIS5513=y

CONFIG_BLK_DEV_SLC90E66=y

CONFIG_BLK_DEV_TRM290=y

CONFIG_BLK_DEV_VIA82CXXX=y

# CONFIG_IDE_ARM is not set

# CONFIG_IDE_CHIPSETS is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set

```

Dose anyone have any suggestions?

----------

## 870Fragmaster

I figured out what to do, you have to enable 

```
Processor type and features  --->[*] Generic x86 support
```

 and then build the amd74xx driver as a module or in the kernel

----------

## pjp

Moved from Other Things Gentoo.

----------

## Bob P

 *quirkie0 wrote:*   

> Hello folks, 
> 
> I've trouble activating DMA on my Gentoo freshly updated to kernel 2.6.8. I made a search on this board and I found some tips, but in fact everything's done on my system to work fine !
> 
> I have a nForce chipset on the motherboard, which I activate as AMD and nVidia IDE support (compiled into the kernel), but as I reboot the system, I still have the ugly message DMA isn't active (and the bad performances). 
> ...

 

i have just finished a Stage 1 install using 2.6.9-gentoo-r3 and i'm having the same problem.  although DMA access was configurable during the installation, it became disabled as soon as i rebooted with the new kernel.

i am using an P3-800 with an i810 chipset.  the chipset is properly enabled and P3 has been chosen as the processor type.  this has been compiled into the kernel, not into a module.  but still no DMA.

interestingly, i recompiled with the box for [*] Generic x86 support, but no improvement.  are we confident that this is the solution?

----------

## Bob P

I have recompiled my 2.6.9-r3 kernel with the following features enabled:

Processor Type and Features

Subarchitecture: PC-compatible

Processor Family:  Pentium III

[*] Generic x86 support

and

ATA/ATAPI/MFM/RLL Support

[*] PCI IDE chipset support

[*]    Generic PCI bus-master DMA support

[*]        Use PCI DMA by default when available

still no DMA.    :Question: 

----------

## 870Fragmaster

Try 

```
Device Drivers ---> ATA/ATAPI/MFM/RLL support ---> < >   Intel PIIXn chipsets support
```

----------

## Bob P

OK, I tired it:

Processor Type and Features -->

Subarchitecture: PC-compatible  -->

Processor Family: Pentium III -->

[*] Generic x86 support 

and 

Device Drivers -->

ATA/ATAPI/MFM/RLL Support -->

[*] PCI IDE chipset support 

[*] Generic PCI bus-master DMA support 

[*] Use PCI DMA by default when available 

[*] Intel PIIXn chipset support

still no DMA.  :Sad: 

thanks for the suggestion!

----------

## ruizs

I was having a similar problem, just setup the latest gentoo, didn't have dma working.  I have a shuttle nforce2 board.

I was able to get it to work by compiling the Nforce IDE in the kernel, and disabling all the generic IDE chipset support.  I added a few in there as modules (from the suggestions on this thread) but they're not loaded/needed.  Here are the relevant lines from my config, hopefully this helps:

```

#

# IDE chipset support/bugfixes

#

# CONFIG_IDE_GENERIC is not set

# CONFIG_BLK_DEV_CMD640 is not set

CONFIG_BLK_DEV_IDEPCI=y

# CONFIG_IDEPCI_SHARE_IRQ is not set

# CONFIG_BLK_DEV_OFFBOARD is not set

# CONFIG_BLK_DEV_GENERIC is not set

# CONFIG_BLK_DEV_OPTI621 is not set

# CONFIG_BLK_DEV_RZ1000 is not set

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

# CONFIG_BLK_DEV_AEC62XX is not set

# CONFIG_BLK_DEV_ALI15X3 is not set

CONFIG_BLK_DEV_AMD74XX=y

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_SC1200 is not set

CONFIG_BLK_DEV_PIIX=m

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

CONFIG_BLK_DEV_SIIMAGE=m

# CONFIG_BLK_DEV_SIS5513 is not set

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

CONFIG_BLK_DEV_VIA82CXXX=m

# CONFIG_IDE_ARM is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set
```

----------

## Bob P

i just got it working in 2.6.9-gentoo-r4.

i have been told by a developer that my Dell Optiplex GX110 carries an intel chipset that has been "blacklisted" by the linux PIIx driver.  this means that when the driver finds my chipset, it forces DMA off.   :Evil or Very Mad:   :Twisted Evil: 

by some measure of good fortune, the generic IDE driver appears to be turning it back on in -r4.  according to the developers, this should not be happening, but i am not complaining.  i just hope that they don't "fix" whatever made this work for me now that they know about it.

----------

## Attalya

I have the same problem with my Toshiba M30, but if I put PIIx like module into the kernel, my DMA work. The only problem is one bad messages booting my computer suggesting active DMA into the kernel.

Kernel gentoo-dev-sources 2.6.9_r4 

Sorry, I not speak english   :Embarassed: 

Regards

----------

## Taglia

 *870Fragmaster wrote:*   

> I figured out what to do, you have to enable 
> 
> ```
> Processor type and features  --->[*] Generic x86 support
> ```
> ...

 

This works for me too   :Very Happy: 

----------

