Bug#360263: hdparm: "Operation not permitted" when trying to set DMA (reportbug: message 3 of 10)

2006-04-01 Thread Matthew Exon
Stephen Gran - [EMAIL PROTECTED] wrote:
> This one time, at band camp, Matthew Exon said:
> 
>>/dev/hdb:
>> setting using_dma to 1 (on)
>> HDIO_SET_DMA failed: Operation not permitted
> 
> 
> This is only likely to happen if the kernel module dealing with your ide
> controller is unable to handle DMA.
> 
> 
>>I've googled around for people who've run into similar problems, but it 
>>always seems to be caused by badly configured kernels.
> 
> 
> And this is likely your problem as well.  Please post the output of
> lsmod & lspci.  In assume that ide-generic is grabbing the ide controller
> before the module that has DMA support is able to.

Thanks for the quick response.  This provided me with enough clues to
get a workaround, at least.  I already had a vague idea that it was
something to do with the order in which the modules were being loaded,
so I was trying to compile the IDE modules into the kernel.  But I had
only targeted the modules shown by lsmod | grep ide.  I didn't realise
that there was a specific IDE driver too.  I've now compiled via82cxxx
into the kernel as well, and it works.  Hooray!

This is only a workaround though, because I'm having to compile my own
kernel.  I really want to use the stock Debian kernels, and these
continue not to work.  I don't know which package is causing the DMA
problem, but I suspect it's an interaction between linux-image and
initramfs-tools - I know that there were some problems with the initrd
stuff in the 2.6.12 to 2.6.15 transition, so it's likely I'm seeing some
residue of that.  What do you think - should I take my bug to
initramfs-tools?  Bear in mind that this is all with stock kernels,
nothing to do with compiling my own custom kernel or anything.  The
custom kernel is just a workaround.  It's a real problem, not just me
living on the bleeding edge and cutting myself :-)

So there doesn't seem to be a bug in hdparm, except that the error
message is very confusing.  I'm not the only person to be totally
confused by "Operation not permitted".  It's more of a feature request,
but it'd be nice if hdparm could catch this situation and print a more
helpful error message, rather than just using perror.  This is an
upstream thing of course.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#360263: hdparm: "Operation not permitted" when trying to set DMA (reportbug: message 3 of 10)

2006-04-01 Thread Matthew Exon
Stephen Gran - [EMAIL PROTECTED] wrote:

> Please post the output of lsmod & lspci.

Oops, forgot to do that.

Here's lsmod when running kernel 2.6.15-1-k7.  Assuming the list is
more-or-less in reverse order of the time of installation, you seem to
be right that via82cxxx is being loaded after ide_generic.  Possibly
there's some setting I can set somewhere to reverse this order?

Module  Size  Used by
r128   42176  1
drm64724  2 r128
rfcomm 34200  0
l2cap  21572  5 rfcomm
bluetooth  41892  4 rfcomm,l2cap
ipv6  222976  18
lp 10628  0
button  6544  0
ac  4740  0
battery 9476  0
nls_iso8859_1   4032  1
nls_cp437   5696  1
vfat   11968  1
fat46428  1 vfat
stv0299 9608  0
dvb_core   72744  1 stv0299
joydev  8960  0
i2c_viapro  8020  0
snd_ice171256324  0
snd_ice17xx_ak4xxx  4032  1 snd_ice1712
evdev   8896  2
snd_ak4xxx_adda 5824  2 snd_ice1712,snd_ice17xx_ak4xxx
i2c_core   19408  2 stv0299,i2c_viapro
snd_cs8427  9216  1 snd_ice1712
snd_ac97_codec 82528  1 snd_ice1712
snd_pcm_oss46112  0
snd_mixer_oss  16576  1 snd_pcm_oss
snd_mpu401  6344  0
snd_pcm77704  3 snd_ice1712,snd_ac97_codec,snd_pcm_oss
snd_timer  21444  1 snd_pcm
snd_page_alloc  9992  1 snd_pcm
snd_ac97_bus2112  1 snd_ac97_codec
mousedev   10592  0
snd_i2c 5056  2 snd_ice1712,snd_cs8427
snd_mpu401_uart 6656  2 snd_ice1712,snd_mpu401
via_ircc   23252  0
ns558   5188  0
analog 10400  0
snd_rawmidi22688  1 snd_mpu401_uart
snd_seq_device  8012  1 snd_rawmidi
pcspkr  1732  0
irda  162940  1 via_ircc
snd48740  13
snd_ice1712,snd_ak4xxx_adda,snd_cs8427,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_mpu401,snd_pcm,snd_timer,snd_i2c,snd_mpu401_uart,snd_rawmidi,snd_seq_device
via_agp 9344  1
agpgart31496  2 drm,via_agp
floppy 54916  0
rtc11508  0
shpchp 39872  0
pci_hotplug24884  1 shpchp
psmouse32516  0
gameport   14024  3 ns558,analog
soundcore   8992  1 snd
crc_ccitt   2048  1 irda
parport_pc 32324  1
parport31880  2 lp,parport_pc
serio_raw   6596  0
ext3  118664  1
jbd48724  1 ext3
mbcache 8516  1 ext3
ide_cd 36804  0
cdrom  33568  1 ide_cd
usbhid 32608  0
via82cxxx   8260  0 [permanent]
generic 4356  0 [permanent]
ehci_hcd   29064  0
via_rhine  21124  0
mii 5248  1 via_rhine
uhci_hcd   28304  0
usbcore   113924  4 usbhid,ehci_hcd,uhci_hcd
thermal13512  0
processor  22976  1 thermal
fan 4676  0
ide_disk   15936  5
ide_generic 1216  0 [permanent]
ide_core  112928  5
ide_cd,via82cxxx,generic,ide_disk,ide_generic

Here's lsmod when running my new, working, custom 2.6.15 kernel:

Module  Size  Used by
r128   42176  1
drm64724  2 r128
rfcomm 34200  0
l2cap  21572  5 rfcomm
bluetooth  41892  4 rfcomm,l2cap
ipv6  222976  67
lp 10628  0
button  6544  0
ac  4740  0
battery 9476  0
nls_iso8859_1   4032  1
nls_cp437   5696  1
vfat   11968  1
fat46428  1 vfat
stv0299 9608  0
dvb_core   72744  1 stv0299
joydev  8960  0
psmouse32516  0
serio_raw   6596  0
evdev   8896  2
snd_ice171256324  3
snd_ice17xx_ak4xxx  4032  1 snd_ice1712
i2c_viapro  8020  0
snd_ak4xxx_adda 5824  2 snd_ice1712,snd_ice17xx_ak4xxx
snd_cs8427  9216  1 snd_ice1712
snd_ac97_codec 82528  1 snd_ice1712
snd_pcm_oss46112  1
snd_mixer_oss  16576  2 snd_pcm_oss
mousedev   10592  1
i2c_core   19408  2 stv0299,i2c_viapro
snd_pcm77704  3 snd_ice1712,snd_ac97_codec,snd_pcm_oss
snd_timer  21444  1 snd_pcm
snd_page_alloc  9992  1 snd_pcm
snd_ac97_bus2112  1 snd_ac97_codec
via_ircc   23252  0
snd_i2c 5056  2 snd_ice1712,snd_cs8427
snd_mpu401  6344  0
snd_mpu401