HDIO_SET_DMA failed: Operation not permitted

Bug #17366 reported by daniel mouritsen
8
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
High
Jeff Bailey

Bug Description

When trying to enable (so i can burn DVDs faster than x2) DMA on my NEC-DVD
burner I get the following error:

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

I'm using the "-686-smp" kernel packages

I'm pretty sure this is a issue with ubuntu, and not the drive. Since I also
have a gentoo install on my system, where I'm allowed to enable/disable DMA on
the drive.

Revision history for this message
Corey Burger (corey.burger) wrote :

I have also seen this:

Drive: Pioneer DVR-109
Kernel: 2.6.10-7 -k7 and -386

Revision history for this message
Saul (bugs-saul) wrote :

I have tried and confirmed the following solution from ubuntu forums. We need
something to automatically select the correct ide controller module and modify
the relevant config files. On my Intel P4 system the module was "piix".

[QUOTE from http://ubuntuforums.org/archive/index.php/t-24046.html]

Hey all...

I've been researching this problem and I figured it out.
- I have an AMD64 on a mobo with nforce3 and I boot off a SATA drive.
- I was having problems burning DVDs and found I needed to turn on DMA and I got
the 'HDIO_SET_DMA failed: Operation not permitted' error.
- I read in Bugzilla that it was due to the ide_* drivers grabbing the devices
too soon and setting them to PIO
- The supposed fix was to put AMD74xx first in my /etc/modules file so that it
would get to these ide devices first... This caused my system to hang on bootup
- My fix was to edit /etc/hotplug/blacklist and add AMD74xx. This allowed
AMD74xx to be assigned from /etc/modules.
-Command line test of 'sudo hdparm /dev/hda' was successful so I edited
/etc/hdparm.conf to turn on DMA automatically at bootup and it works!

Yeah! \\:D/
Oz

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

(In reply to comment #2)
> I have tried and confirmed the following solution from ubuntu forums. We need
> something to automatically select the correct ide controller module and modify
> the relevant config files. On my Intel P4 system the module was "piix".

There already exists a facility for loading the correct driver via hotplug, so
no configuration changes (manual or automatic) should be necessary.

Was this only a problem for you during bootup (i.e., could you use hdparm after
booting successfully?)? If so, this is a duplicate of bug #11646.

Otherwise, please send "lspci" and "lspci -n" output to show us which controller
you have.

Revision history for this message
Saul (bugs-saul) wrote :

(In reply to comment #3)
> There already exists a facility for loading the correct driver via hotplug, so
> no configuration changes (manual or automatic) should be necessary.
>
> Was this only a problem for you during bootup (i.e., could you use hdparm after
> booting successfully?)? If so, this is a duplicate of bug #11646.
>
> Otherwise, please send "lspci" and "lspci -n" output to show us which controller
> you have.

The problem I and many others on the ubuntu forum have had seems to be specific
to PC's with and SATA controller (see the forum list for detail:
shttp://ubuntuforums.org/archive/index.php/t-24046.html).

This is a problem during *and* after boot. My problem was fixed using the quoted
solution i.e. add the relevant ide controller module (piix in my sace) to both
/etc/modules (before ide-generic and ide-disk) and /etc/hotplug/blacklist.

Revision history for this message
Björn Torkelsson (torkel) wrote :

I'm also having this problem with 2.6.12-7-686 on an IBM Thinkpad T40p for
/dev/hda. It works in 2.6.12-6-686, so something must have changed in -7.

Just for the sake of it; output from lspci and lspci -n follows:

ankpelle[Ubuntu]# lspci
0000:00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 03)
0000:00:01.0 PCI bridge: Intel Corp. 82855PM Processor to AGP Controller (rev 03)
0000:00:1d.0 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M)
USB UHCI Controller #1 (rev 01)
0000:00:1d.1 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M)
USB UHCI Controller #2 (rev 01)
0000:00:1d.2 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M)
USB UHCI Controller #3 (rev 01)
0000:00:1d.7 USB Controller: Intel Corp. 82801DB/DBM (ICH4/ICH4-M) USB 2.0 EHCI
Controller (rev 01)
0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev 81)
0000:00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 01)
0000:00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4) Ultra ATA Storage
Controller (rev 01)
0000:00:1f.3 SMBus: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus
Controller (rev 01)
0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
0000:00:1f.6 Modem: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem
Controller (rev 01)
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf
[Radeon Mobility 9000 M9] (rev 02)
0000:02:00.0 CardBus bridge: Texas Instruments PCI1520 PC card Cardbus
Controller (rev 01)
0000:02:00.1 CardBus bridge: Texas Instruments PCI1520 PC card Cardbus
Controller (rev 01)
0000:02:01.0 Ethernet controller: Intel Corp. 82540EP Gigabit Ethernet
Controller (Mobile) (rev 03)
0000:02:02.0 Network controller: Intel Corp. PRO/Wireless LAN 2100 3B Mini PCI
Adapter (rev 04)
ankpelle[Ubuntu]# lspci -n
0000:00:00.0 0600: 8086:3340 (rev 03)
0000:00:01.0 0604: 8086:3341 (rev 03)
0000:00:1d.0 0c03: 8086:24c2 (rev 01)
0000:00:1d.1 0c03: 8086:24c4 (rev 01)
0000:00:1d.2 0c03: 8086:24c7 (rev 01)
0000:00:1d.7 0c03: 8086:24cd (rev 01)
0000:00:1e.0 0604: 8086:2448 (rev 81)
0000:00:1f.0 0601: 8086:24cc (rev 01)
0000:00:1f.1 0101: 8086:24ca (rev 01)
0000:00:1f.3 0c05: 8086:24c3 (rev 01)
0000:00:1f.5 0401: 8086:24c5 (rev 01)
0000:00:1f.6 0703: 8086:24c6 (rev 01)
0000:01:00.0 0300: 1002:4c66 (rev 02)
0000:02:00.0 0607: 104c:ac55 (rev 01)
0000:02:00.1 0607: 104c:ac55 (rev 01)
0000:02:01.0 0200: 8086:101e (rev 03)
0000:02:02.0 0280: 8086:1043 (rev 04)

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

I'm seeing this in Breezy as well, as a regression from initrd->initramfs (which
should otherwise address these issues). I see a kernel message, which
unfortunately was pushed out of the ring buffer by others, which was something
like "VP_IDE: ... already claimed by ide0". Is perhaps ide-generic being loaded
ahead of the chipset-specific driver?

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

(In reply to comment #6)
> I'm seeing this in Breezy as well, as a regression from initrd->initramfs (which
> should otherwise address these issues). I see a kernel message, which
> unfortunately was pushed out of the ring buffer by others, which was something
> like "VP_IDE: ... already claimed by ide0". Is perhaps ide-generic being loaded
> ahead of the chipset-specific driver?

I've filed this issue, which is a different one from the original issue here, as
bug #20481

Revision history for this message
Jeff Bailey (jbailey) wrote :

Are you still seeing this with current Breezy and with nothing in your
/etc/mkinitramfs/modules file?

If yes, I'd like to troubleshoot it with you further.

Tks,
Jeff Bailey

Revision history for this message
Jeff Bailey (jbailey) wrote :

No response in 10 days, assuming that ordering ide-generic has fixed this bug.

Please reopen if you're still seeing this.

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.