Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Suddenly DMA isn't working: "Operation not permitted&qu

Need help with peripherals or devices?
Post Reply
Message
Author
Matthew Exon

Suddenly DMA isn't working: "Operation not permitted&qu

#1 Post by Matthew Exon »

I recently updated my Etch system. It seemed to run "OK", although it seemed weirdly slow. However, I've just discovered that I can't burn CDs, and while investigating this I noticed that neither of my hard disks and neither of my CD drives has DMA switched on.

When I try to use hdparm to switch them on, I get this:

Code: Select all

aeon:~# umount /dev/hdb1
aeon:~# hdparm -d1 /dev/hdb

/dev/hdb:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
I've tried this with two different kernels, 2.6.12-1-k7 and 2.6.15-1-k7. Both give the same result. I also tried using Knoppix, and this was able to turn on DMA no problems. So it's not a hardware problem.

Googling around, it seems that the error message, "Operation not permitted", is almost always misleading. It's usually caused by the kernel not having the right features compiled in, and nothing to do with permissions at all. However, since I'm using stock kernels, this shouldn't be a problem for me. Looking in the config, everything seems to be set reasonably.

Any ideas? Anyone else having this problem?

BTW, my fundamental problem is that I can't burn CDs. cdrecord gives up almost immediately, complaining about a buffer underrun. It's possible that this has nothing to do with DMA, but the DMA problem is serious enough that I'd like it fixed.

Matthew Exon

#2 Post by Matthew Exon »

Just as a note, I googled around and some people with similar problems solved them by compiling the IDE drivers into the kernel, instead of having them as modules. I tried this, and it doesn't make any difference. That's what I would have expected anyway, since reverting to my old working kernel didn't make any difference. The problem is clearly in some other package, but I have no idea how to find out which. This is pretty frustrating. My computer is practically unusable right now, it's so slow.

Matthew Exon

#3 Post by Matthew Exon »

I eventually submitted a bug against hdparm, and after discussing it with the maintainer:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=360263

...I found the problem was that late last year I'd had a problem installing a linux 2.6.15, and after reading the discussion of this bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343048

...I'd added ide-generic and ide-disk to /etc/mkinitramfs/modules:

The result was that ide-generic grabbed the device before the module via82cxxx was loaded. This meant that via82cxxx couldn't control DMA like it's supposed to. The tricky part is that 2.6.15 didn't work for me anyway, so I reverted to my existing 2.6.12. It was only when I reinstalled 2.6.12, several months later, that /etc/mkinitramfs/modules was read and "suddenly" DMA disappeared.

Adding via82cxxx as well would have solved the problem, but since the workaround itself isn't necessary any more, I just deleted both of the lines I added, reinstalled the kernel package, and it worked.

I guess I'm talking to myself here, but if anyone else has this problem and happens to google up my original complaint, well, that's the answer.

Post Reply