# HDIO_SET_DMA failed: Operation not permitted

## Janko

Hi,

I'm having problems with my hard drive and my cdrom. I'm using linux-2.6.15-gentoo-r1 kernel and Gigabyte GA-8I915P-G motherboard (Southbridge : Intel® ICH6). For some reason I can't find I can't get them to work in dma mode. Could someone please tell me what to do to solve that problem.

Here is the info from my PC, please let me know if I forgot to include something.

Thanks in advance.

Janko

--------------------------------------------------------------

/dev/hdd:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

--------------------------------------------------------------

linux # hdparm -d1 /dev/hdc

/dev/hdc:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

--------------------------------------------------------------

linux # grep CONFIG_BLK_DEV .config

CONFIG_BLK_DEV_FD=y

# CONFIG_BLK_DEV_DAC960 is not set

# CONFIG_BLK_DEV_UMEM is not set

# CONFIG_BLK_DEV_COW_COMMON is not set

# CONFIG_BLK_DEV_LOOP is not set

# CONFIG_BLK_DEV_NBD is not set

# CONFIG_BLK_DEV_SX8 is not set

# CONFIG_BLK_DEV_UB is not set

# CONFIG_BLK_DEV_RAM is not set

CONFIG_BLK_DEV_RAM_COUNT=16

CONFIG_BLK_DEV_IDE=y

# CONFIG_BLK_DEV_IDE_SATA is not set

# CONFIG_BLK_DEV_HD_IDE is not set

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

CONFIG_BLK_DEV_IDEFLOPPY=y

# CONFIG_BLK_DEV_IDESCSI is not set

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_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_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_CS5535 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=y

# CONFIG_BLK_DEV_IT821X is not set

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

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_BLK_DEV_HD is not set

CONFIG_BLK_DEV_SD=y

# CONFIG_BLK_DEV_SR is not set

# CONFIG_BLK_DEV_3W_XXXX_RAID is not set

--------------------------------------------------------------

linux # hdparm -i /dev/hdc

/dev/hdc:

 Model=IC35L090AVV207-0, FwRev=V23OA66A, SerialNo=VNVC06G3CTSJYL

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

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

 BuffType=DualPortCache, BuffSize=1821kB, MaxMultSect=16, MultSect=16

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

 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

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a:

 * signifies the current active mode

--------------------------------------------------------------

linux # hdparm /dev/hdc

/dev/hdc:

 multcount    = 16 (on)

 IO_support   =  0 (default 16-bit)

 unmaskirq    =  0 (off)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 16383/255/63, sectors = 82348277760, start = 0

--------------------------------------------------------------

linux # hdparm -I /dev/hdc

/dev/hdc:

ATA device, with non-removable media

powers-up in standby; SET FEATURES subcmd spins-up.

        Model Number:       IC35L090AVV207-0

        Serial Number:      VNVC06G3CTSJYL

        Firmware Revision:  V23OA66A

Standards:

        Used: ATA/ATAPI-6 T13 1410D revision 3a

        Supported: 6 5 4 3

Configuration:

        Logical         max     current

        cylinders       16383   65535

        heads           16      1

        sectors/track   63      63

        --

        CHS current addressable sectors:    4128705

        LBA    user addressable sectors:  160836480

        LBA48  user addressable sectors:  160836480

        device size with M = 1024*1024:       78533 MBytes

        device size with M = 1000*1000:       82348 MBytes (82 GB)

Capabilities:

        LBA, IORDY(can be disabled)

        bytes avail on r/w long: 52     Queue depth: 32

        Standby timer values: spec'd by Standard, no device specific minimum

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

        Advanced power management level: unknown setting (0x0000)

        Recommended acoustic management value: 128, current value: 254

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

             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:

           *    NOP cmd

           *    READ BUFFER cmd

           *    WRITE BUFFER cmd

           *    Host Protected Area feature set

                Release interrupt

           *    Look-ahead

           *    Write cache

           *    Power Management feature set

                Security Mode feature set

                SMART feature set

           *    FLUSH CACHE EXT command

           *    Mandatory FLUSH CACHE command

           *    Device Configuration Overlay feature set

           *    48-bit Address feature set

                Automatic Acoustic Management feature set

                SET MAX security extension

                Address Offset Reserved Area Boot

                SET FEATURES subcommand required to spinup after power up

                Power-Up In Standby feature set

                Advanced Power Management feature set

           *    READ/WRITE DMA QUEUED

           *    General Purpose Logging feature set

           *    SMART self-test

           *    SMART error logging

Security:

        Master password revision code = 65534

                supported

        not     enabled

        not     locked

        not     frozen

        not     expired: security count

        not     supported: enhanced erase

        46min for SECURITY ERASE UNIT.

HW reset results:

        CBLID- above Vih

        Device num = 0 determined by the jumper

Checksum: correct

--------------------------------------------------------------

linux # lspci

00:00.0 Host bridge: Intel Corporation 915G/P/GV/GL/PL/910GL Express Memory Controller Hub (rev 04)

00:01.0 PCI bridge: Intel Corporation 915G/P/GV/GL/PL/910GL Express PCI Express Root Port (rev 04)

00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)

00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)

00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d3)

00:1f.0 ISA bridge: Intel Corporation 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge (rev 03)

00:1f.2 IDE interface: Intel Corporation 82801FB/FW (ICH6/ICH6W) SATA Controller (rev 03)

00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)

01:00.0 VGA compatible controller: nVidia Corporation NV43 [GeForce 6600 GT] (rev a2)

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

--------------------------------------------------------------

linux # hdparm -i /dev/hdd

/dev/hdd:

 Model=_NEC DVD_RW ND-2510A, FwRev=2.15, SerialNo=

 Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }

 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0

 BuffType=unknown, BuffSize=0kB, MaxMultSect=0

 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0

 IORDY=yes, tPIO={min:120,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

 AdvancedPM=no

 * signifies the current active mode

--------------------------------------------------------------

linux # hdparm -I /dev/hdd

/dev/hdd:

ATAPI CD-ROM, with removable media

        Model Number:       _NEC DVD_RW ND-2510A

        Serial Number:

        Firmware Revision:  2.15

Standards:

        Likely used CD-ROM ATAPI-1

Configuration:

        DRQ response: 3ms.

        Packet size: 12 bytes

Capabilities:

        LBA, IORDY(cannot be disabled)

        DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4

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

--------------------------------------------------------------

----------

## loloferrari

I'm not sure you need someone to confirm that but I think it's a kernel related problem, maybe an invalid option you selected in your kernel, or maybe the kernel itself that doesn't fit your computer... Perhaps it would be useful to try another, older kernel version (2.13 are rather good)

----------

## radio_flyer

This is a somewhat old thread but the issue still seems to exist as of kernel 2.6.17.6 so I thought I'd reply:

My laptop (Centrino ICH6) has the same issue. The fix I've been using for the last six months is the one shown here:

http://marc.theaimsgroup.com/?l=linux-ide&m=114317385718285&w=2

The two files I have to change in the kernel are drivers/ide/pci/piix.c and include/linux/pci_ids.h. The website above shows the patch for the 2.6.16 version of the kernel, but the changes still work in the 2.6.17.6 kernel. (Note that I apply the patches by hand since there are slight differences in the new pci_ids.h file.)

Some background on this issue is available here:

http://www.thinkwiki.org/wiki/Problems_with_SATA_and_Linux

http://www.ussg.iu.edu/hypermail/linux/kernel/0505.2/1656.html

So, the fix seems to be:

[list=]

[*]If your BIOS allows you to turn off the combined PATA/SATA mode, do so. Unfortunately, a lot of them that use the ICH6 chip don't.

[*]Apply the patches shown in the website above and use the older ATA drivers.

[*]Wait for the kernel developers to finish the SATA libata library, which in theory will support the PATA mode of the combined chips.

[/list]

The current status page for the libata (SATA) driver is shown here:

http://linux-ata.org/software-status.html

This line in the status report hasn't changed in a long time:

 *Quote:*   

> 
> 
> libata PATA drivers will not be turned on by default for a long time, to avoid conflicts with CONFIG_IDE (the traditional IDE driver).
> 
> 

 

If anybody knows differently and has the ICH6 chip running in combined mode (no BIOS option) with the new SATA library with DMA, please reply with the kernel options I need to enable so I can stop patching the kernel. Thanks!

----------

