can't enable dma on ide hard drives

Bug #14497 reported by Simon Morgan
8
Affects Status Importance Assigned to Milestone
linux-source-2.6.15 (Ubuntu)
Invalid
Medium
Fabio Massimo Di Nitto

Bug Description

When I try to enable DMA on my IDE hard drives (both Western Digital) I get the
following error. It wouldn't be so bad if it wasn't for the fact that without
DMA anything I/O intensive is excrutiatingly slow and causes system load to
shoot through the roof.

simon@bainbridge:~$ sudo hdparm -d 1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma = 0 (off)

simon@bainbridge:~$ sudo hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media
 Model Number: WDC WD1600JB-00DUA3
 Serial Number: WD-WMACK1760128
 Firmware Revision: 75.13B75
Standards:
 Supported: 6 5 4 3
 Likely used: 6
Configuration:
 Logical max current
 cylinders 16383 65535
 heads 16 1
 sectors/track 63 63
 --
 CHS current addressable sectors: 4128705
 LBA user addressable sectors: 268435455
 LBA48 user addressable sectors: 312581808
 device size with M = 1024*1024: 152627 MBytes
 device size with M = 1000*1000: 160041 MBytes (160 GB)
Capabilities:
 LBA, IORDY(can be disabled)
 bytes avail on r/w long: 74 Queue depth: 1
 Standby timer values: spec'd by Standard, with device specific minimum
 R/W multiple sector transfer: Max = 16 Current = 0
 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=120ns IORDY flow control=120ns
Commands/features:
 Enabled Supported:
    * READ BUFFER cmd
    * WRITE BUFFER cmd
    * Host Protected Area feature set
    * 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
    * DOWNLOAD MICROCODE cmd
    * SMART self-test
    * SMART error logging
Security:
  supported
 not enabled
 not locked
 not frozen
 not expired: security count
 not supported: enhanced erase
HW reset results:
 CBLID- above Vih
 Device num = 0 determined by CSEL
Checksum: correct

simon@bainbridge:~$ lspci
0000:00:00.0 Memory controller: nVidia Corporation: Unknown device 005e (rev a3)
0000:00:01.0 ISA bridge: nVidia Corporation: Unknown device 0050 (rev a3)
0000:00:01.1 SMBus: nVidia Corporation: Unknown device 0052 (rev a2)
0000:00:02.0 USB Controller: nVidia Corporation: Unknown device 005a (rev a2)
0000:00:02.1 USB Controller: nVidia Corporation: Unknown device 005b (rev a3)
0000:00:04.0 Multimedia audio controller: nVidia Corporation: Unknown device
0059 (rev a2)
0000:00:06.0 IDE interface: nVidia Corporation: Unknown device 0053 (rev a2)
0000:00:07.0 IDE interface: nVidia Corporation: Unknown device 0054 (rev a3)
0000:00:08.0 IDE interface: nVidia Corporation: Unknown device 0055 (rev a3)
0000:00:09.0 PCI bridge: nVidia Corporation: Unknown device 005c (rev a2)
0000:00:0a.0 Bridge: nVidia Corporation: Unknown device 0057 (rev a3)
0000:00:0b.0 PCI bridge: nVidia Corporation: Unknown device 005d (rev a3)
0000:00:0c.0 PCI bridge: nVidia Corporation: Unknown device 005d (rev a3)
0000:00:0d.0 PCI bridge: nVidia Corporation: Unknown device 005d (rev a3)
0000:00:0e.0 PCI bridge: nVidia Corporation: Unknown device 005d (rev a3)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
0000:01:00.0 VGA compatible controller: nVidia Corporation: Unknown device 0141
(rev a2)

Revision history for this message
Simon Morgan (sjmorgan) wrote :

Updated lscpi output (just discovered update-pciids):

simon@bainbridge:~$ lspci
0000:00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)
0000:00:01.0 ISA bridge: nVidia Corporation: Unknown device 0050 (rev a3)
0000:00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)
0000:00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)
0000:00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)
0000:00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio
Controller (rev a2)
0000:00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev a2)
0000:00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev a3)
0000:00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev a3)
0000:00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)
0000:00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)
0000:00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
0000:00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
0000:00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
0000:00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
HyperTransport Technology Configuration
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
Address Map
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
DRAM Controller
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
Miscellaneous Control
0000:01:00.0 VGA compatible controller: nVidia Corporation: Unknown device 0141
(rev a2)

Revision history for this message
Matt Zimmerman (mdz) wrote :

Please send lsmod output

Revision history for this message
Simon Morgan (sjmorgan) wrote :

Module Size Used by
proc_intf 4420 0
freq_table 4872 0
cpufreq_userspace 5456 0
cpufreq_ondemand 7596 0
cpufreq_powersave 2176 0
video 18760 0
sony_acpi 6864 0
pcc_acpi 13568 0
button 7776 0
battery 11400 0
container 5120 0
ac 5640 0
ipv6 268512 11
smbfs 72328 2
forcedeth 18880 0
amd74xx 15472 1
snd_intel8x0 35584 1
tsdev 8768 0
snd_ac97_codec 80992 1 snd_intel8x0
snd_pcm_oss 56676 0
usbhid 34176 0
snd_mixer_oss 20288 2 snd_pcm_oss
snd_pcm 102348 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer 26184 1 snd_pcm
snd 58600 6
snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 11360 2 snd
snd_page_alloc 11400 2 snd_intel8x0,snd_pcm
ehci_hcd 33604 0
ohci_hcd 22408 0
pcspkr 4024 0
evdev 10688 0
nls_cp437 7232 1
ntfs 102400 1
capability 5832 0
commoncap 9536 1 capability
nvidia 4056060 12
rtc 13320 0
psmouse 22412 0
mousedev 13148 1
parport_pc 40648 0
lp 13104 0
parport 40844 2 parport_pc,lp
ide_generic 1728 0
ide_disk 20800 0
ide_cd 45192 0
ide_core 150276 4 amd74xx,ide_generic,ide_disk,ide_cd
cdrom 43304 1 ide_cd
ext3 140560 1
jbd 60976 1 ext3
mbcache 9160 1 ext3
sd_mod 18584 4
sata_nv 9860 3
libata 55560 1 sata_nv
scsi_mod 143448 2 sd_mod,libata
unix 30016 634
thermal 15692 0
processor 26432 1 thermal
fan 5256 0
fbcon 38688 0
font 8960 1 fbcon
bitblit 5888 1 fbcon
vesafb 7680 0
cfbcopyarea 4288 1 vesafb
cfbimgblt 3200 1 vesafb
cfbfillrect 4288 1 vesafb

Revision history for this message
Simon Morgan (sjmorgan) wrote :

OK I seem to have found a solution. The amd74xx driver needs to be loaded before
the ide-* ones which doesn't seem to happen by default (at least not with this
hardware). Whether this is the responsibility of the kernel or some userland
program is obviously your field of expertise.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Are you using Warty or Hoary? Such a bug was fixed in Hoary, in hotplug
0.0.20040329-16ubuntu11

Revision history for this message
Simon Morgan (sjmorgan) wrote :

Hoary. I have 0.0.20040329-16ubuntu17 installed but had to resort to putting
amd74xx in /etc/modules above the ide modules.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Just remove the ide-* modules from /etc/modules; they should be loaded automatically

This bug has been marked as a duplicate of bug 8509.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.