# Error enabling DMA on drives.

## Royle

Ever since I update my system with emerge -uaDv I have gotten errors saying DMA was being enabled on all my drives.  I tried enabling it in console and get the following error:

```
root@mike-linux mike # hdparm -d1 /dev/hdb

/dev/hdb:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

Does anyone know what's wrong and how to fix it?  Thanks in advance for your help.

----------

## arpnuke

I don't know about your hardware, but I had a problem just like this with an nforce 3 motherboard.  When I upgraded kernels I forgot to go into Device Drivers -> ATA/blah/blah -> AMD and NVIDIA IDE support.  If you don't have an nforce motherboard, you might want to look in there anyways.

----------

## Royle

Weird, I know I'm supposed to enable support for my chipset but I can't find any specific chipset options in "Device Drivers>ATA/ATAPI/MFM/RRL support"  I'm using gentoo-sources BTW.  I think I'm looking for an option for a VIA IDE chipset.

----------

## NeddySeagoon

Royle,

Its at

```
Device Drivers

-> ATA/ATAPI/MFM/RLL support

   -> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support 

      -> PCI IDE chipset support 

         -> Generic PCI bus-master DMA support

            ->VIA82CXXX chipset support 
```

----------

## pavkb

i am getting the exact same error now with hdparm.

i seem to have compiled support for my chipset

```

IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

```

as a module.

I do see the module present in the lsmod output.

what else do i do to fix this.

PS. my ide drive without dma enabled is mighty slow.

----------

## NeddySeagoon

pavkb,

After the module is loadedm you need to run hdparm to enable DMA.

You could rebuild your kernel, with it as built in. It was save using hdparm to set DMA as it can be made the kernel defualt.

----------

## jp_math54

Thanks guys!!!!!

Two days that I'm looking for a way to get rid of the *** DMA not activated *** message at boot 

Still wondering how I missed this in my menuconfig...

----------

## pavkb

```

IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

lsmod | grep via

snd_via82xx            29440  2

snd_ac97_codec         88528  1 snd_via82xx

snd_mpu401_uart         8640  1 snd_via82xx

i2c_viapro              9044  0

via82cxxx              12400  0 [permanent]

sata_via                9668  0

libata                 50312  9 ata_piix,sata_vsc,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil,sata_promise

```

```

IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

hdparm -d1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

as you see, i guess the module is loaded & then i try hdparm & i am still getting that error

----------

## NeddySeagoon

pavkb,

Please post the IDE section of /usr/src/linux/.config

----------

## pavkb

i am not that good at figuring out the IDE portion of the .config.

it would be helpful if i know where to look.

i will try & see what i can find.

----------

## pavkb

is the following is what you are asking? Is there anything else i am to be looking for??

```

#

# 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 is not set

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

CONFIG_BLK_DEV_IDEFLOPPY=m

# CONFIG_BLK_DEV_IDESCSI is not set

# CONFIG_IDE_TASK_IOCTL is not set

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

# CONFIG_BLK_DEV_CMD640 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 is not set

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_BLK_DEV_IDEDMA_FORCED=y

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 is not set

# 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 is not set

# CONFIG_BLK_DEV_IT821X is not set

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CO# CONFIG_BLK_DEV_SVWKS is not set

# CONFIG_BLK_DEV_SIIMAGE is not set

# 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

NFIG_BLK_DEV_PDC202XX_NEW is not set

```

----------

## NeddySeagoon

pavkb,

Thats the right section.

There is only one thing I would change there:-

CONFIG_BLK_DEV_VIA82CXXX=m to =y

However, it possible thats the wrong code for yhour IDE hardware. Please post the IDE lines from lspci before you remake your kernel.

----------

## dsd

yes, you have to build it directly into the kernel.

if you build it as a module and load it sometime after bootup, it will have no effect, because the generic IDE driver has already claimed the device

----------

## pavkb

my ide lines from lspci

```

d0000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

```

----------

## NeddySeagoon

pavkb,

The VIA line is right then - it just needs to be built in.

----------

