# [hdparm] HDIO_SET_DMA failed: Input/output error

## kahler

Hi folks,

I've got a problem with setting the DMA mode of my HDD.

When I try to set it via hdparm -d 1 /dev/hda I get the following error 

```
/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Input/output error

 using_dma    =  0 (off)
```

The really strange thing is that setting the DMA Mode of my CD-ROM works just fine 

```
/dev/hdc:

 setting using_dma to 1 (on)

 using_dma    =  1 (on)
```

Here is my lspci -vv output (the relevant parts) 

```
0000:00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 02)

        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-

        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-

        Latency: 64

        Region 0: Memory at e4000000 (32-bit, prefetchable)

        Capabilities: [a0] AGP version 1.0

                Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x1,x2

                Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW- Rate=<none>

0000:00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 02) (prog-if 00 [Normal decode])

        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B-

        Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-

        Latency: 64

        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64

        I/O behind bridge: 0000d000-0000dfff

        Memory behind bridge: e2000000-e2dfffff

        Prefetchable memory behind bridge: e2f00000-e3ffffff

        Expansion ROM at 0000d000 [disabled] [size=4K]

        BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset- FastB2B+

0000:00:04.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)

        Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-

        Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-

        Latency: 0

0000:00:04.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80 [Master])

        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-

        Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-

        Latency: 32

        Region 4: I/O ports at b800 [size=16]

0000:00:04.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 02)

        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-

        Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-

        Interrupt: pin ? routed to IRQ 9
```

In dmesg I get the following error when trying to activate DMA Mode 

```
hda: Disabling (U)DMA for WDC AC31600H (blacklisted)

hda: Disabling (U)DMA for WDC AC31600H (blacklisted)
```

Has anyone got an idea what this could be and how to solve the problem.

I know it's a very old HDD and not the newest bleeding edge Board but it just works fine as a server  :Wink: 

any help would be appreciated,

Marc

----------

## NeddySeagoon

kahler,

```
hda: Disabling (U)DMA for WDC AC31600H (blacklisted) 
```

probably means that the combination of your IDE controller and WDC AC31600H doesn't work - its in a blacklist.

You can goolge around for more info if you want.

----------

## kahler

 *NeddySeagoon wrote:*   

> ...You can goolge around for more info if you want.

 

Already done this but didn't get a sufficient answer. Otherwise I wouldn't have posted here  :Wink: 

But thanks for your answer anyway.

Anyone else got an idea of what could be done  :Question: 

----------

## NeddySeagoon

kahler,

There is a message here (part of a thread) 

http://www.ussg.iu.edu/hypermail/linux/kernel/9901.2/1565.html, which says that some drives have faulty firmware and some don't. WD even posted a firmware update for some drives.

Other messages in the thread explain how to unblacklist your drive. If you have drive that has the faulty firmware, you will trash your filesystem if you enable DMA. Do you feel like conducting the experiment?

I don't see any firmware updates for your drive on the Western Digital site now.

----------

## kahler

 *NeddySeagoon wrote:*   

> ...There is a message here (part of a thread) ... which says that some drives have faulty firmware and some don't. WD even posted a firmware update for some drives...

 

Hmm...that's not good at all  :Evil or Very Mad: 

 *NeddySeagoon wrote:*   

> ..Do you feel like conducting the experiment...

 

Not really. It's propably not really worth it, what do you reckon  :Question: 

 *NeddySeagoon wrote:*   

> ...I don't see any firmware updates for your drive on the Western Digital site now.

 

Hmm...that's pretty sad  :Crying or Very sad: 

Thanks for your help anyway. I then will just leave it as is and won't use DMA at all (for the sake of data security).

----------

## NeddySeagoon

kahler,

If you can spare the time and have a full backup, I might be tempted.

I don't konw how soon the fault would show up though. 

I would be tempted to err on the side of safety.

----------

## kahler

Well, as you said, I'll leave it just as is.

The risk is propably too high and the advantage not really worth losing data...

...at least not an a server system. Eventually i'll maybe just put a different HDD with no errors in the system.

For now I'll just leave it as is. Thanks for your help anyway.

Cherio,

Kahler

----------

