Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HDIO_SET_DMA failed: Operation not permitted
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dlittlebear
n00b
n00b


Joined: 16 Apr 2004
Posts: 4

PostPosted: Fri Apr 16, 2004 2:16 am    Post subject: HDIO_SET_DMA failed: Operation not permitted Reply with quote

I know this is not the first nor the last on this subject.

I have looked over google.com/linux and searched these forums.
I thought at first it was due to the lack of an 80 conductor cable, replaced the one that was in there with 2 different ones and still same problem.

The PC.
AMD 1.4ghz
/dev/hdd is the one I am working with
abit KT7A (KT133 chipset)

Gentoo 2004.0
kernel 2.6.5
I started with stage1 if it matters.


# hdparm -d1 /dev/hdd

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

# hdparm -tT /dev/hdd

/dev/hdd:
Timing buffer-cache reads: 396 MB in 2.00 seconds = 197.54 MB/sec
Timing buffered disk reads: 6 MB in 3.06 seconds = 1.96 MB/sec


# lspci | grep IDE
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)


# cat /usr/src/linux/.config | grep DMA | grep -v "#"
CONFIG_GENERIC_ISA_DMA=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_ADMA=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y

# cat /usr/src/linux/.config | grep VIA82CXX | grep -v "#"
CONFIG_BLK_DEV_VIA82CXXX=y

# cat /usr/src/linux/.config | grep IDE | grep -v "#"
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_IDE_TASKFILE_IO=y
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y

# dmesg | grep ide
BIOS-provided physical RAM map:
CPU: After generic identify, caps: 0183fbff c1c7fbff 00000000 00000000
CPU: After vendor identify, caps: 0183fbff c1c7fbff 00000000 00000000
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
/dev/ide/host0/bus0/target0/lun0: p1
/dev/ide/host0/bus0/target1/lun0: p1
/dev/ide/host1/bus0/target1/lun0: p1 p2 p3
VP_IDE: port 0x01f0 already claimed by ide0
VP_IDE: port 0x0170 already claimed by ide1

EDIT

# dmesg | grep IDE
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
VP_IDE: IDE controller at PCI slot 0000:00:07.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci0000:00:07.1
VP_IDE: port 0x01f0 already claimed by ide0
VP_IDE: port 0x0170 already claimed by ide1
VP_IDE: neither IDE port enabled (BIOS)


with CAPS IDE, noticed it is not seeing either IDE port.

I can post the full dmesg if needed.


any suggestions appreciated. I hope this is enough information. I read through posts on this same problem for other distros too.
Back to top
View user's profile Send private message
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1612
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Fri Apr 16, 2004 6:36 am    Post subject: Reply with quote

I have the same chipset on a KR7A-RAID board. Kernel 2.6.5 here.

Code:

cat /usr/src/linux/.config | grep IDE | grep -v "#"
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y

you have this, I don't
Code:

CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_IDE_TASKFILE_IO=y


Code:

dmesg | grep ide
BIOS-provided physical RAM map:
CPU:     After generic identify, caps: 0383fbff c1cbfbff 00000000 00000000
CPU:     After vendor identify, caps: 0383fbff c1cbfbff 00000000 00000000
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
    ide0: BM-DMA at 0xdc00-0xdc07, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xdc08-0xdc0f, BIOS settings: hdc:DMA, hdd:DMA
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
 /dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 > p3
 /dev/ide/host0/bus0/target1/lun0: p1 p2 p3


except for the dmesg results and those two config lines, mine looks the same. Have you checked the jumpers on the drive and your bios settings? It looks like your bios could be set wrong perhaps.
Back to top
View user's profile Send private message
alari
n00b
n00b


Joined: 23 Feb 2004
Posts: 47
Location: Tartu, Estonia

PostPosted: Fri Apr 16, 2004 10:26 am    Post subject: Reply with quote

I have a Epox 8RDA3i motherboard witch Quantum Fireball lct15 15gb HDD Ultra ATA 66.When i booted Gentoo 1.4 cd i was able to set the dma but now i use 2.6.4-ck and ia cannot set dma, it says operation no permitted?
Do I have to enable something in kernel, special IDE dma controllers ?
Back to top
View user's profile Send private message
dlittlebear
n00b
n00b


Joined: 16 Apr 2004
Posts: 4

PostPosted: Fri Apr 16, 2004 10:44 am    Post subject: Reply with quote

Code:
except for the dmesg results and those two config lines, mine looks the same. Have you checked the jumpers on the drive and your bios settings? It looks like your bios could be set wrong perhaps.

the jumpers are set correctly. BIOS seems to be set correctly too. That is unless there is something I am missing. I have tried it with and without DMA support enabled in BIOS.

When I initially got this board some time back I had to get a PCI IDE controller. The only way to enable DMA on it was to disable it in bios. This worked to give it extra speed but not enough. Only until recient via chipset drivers have I been able to take out the PCI IDE controller. Now I am at the point where I spent over 5hrs lastnight working on this I am just going to try and install the promise controller and boot form it. Would love to get it working without it though.
Back to top
View user's profile Send private message
thoughts
Apprentice
Apprentice


Joined: 15 Apr 2004
Posts: 153
Location: Pennsylvania

PostPosted: Fri Apr 16, 2004 10:55 am    Post subject: Reply with quote

I'm pretty sure this is a software/kernel issue. I had Slackware on my box for almost a year, both hard drives using DMA. I just installed Gentoo 2004.0 the other day, same box but on the second hard drive, and I got "operation not permitted" when I tried to set the DMA on either drive. That was kernel 2.4.22... yesterday I installed kernel 2.6.3, and DMA works fine on both drives. Reboot back into 2.4.22, DMA is gone. No changes to the BIOS or hardware.

So I don't know which kernel option it is, but I'm pretty sure it's that, and not a BIOS setting.

-Anthony
http://nodivisions.com/
Back to top
View user's profile Send private message
Titan.
n00b
n00b


Joined: 28 Mar 2004
Posts: 28
Location: Sydney, Australia

PostPosted: Fri Apr 16, 2004 1:02 pm    Post subject: Reply with quote

Are you sure you have VIA82CXXX chipset support enabled under "Device Drivers --> ATA/ATAPI/MFM/RLL support"? I had the same problem on my 8K3A+...
Back to top
View user's profile Send private message
rebecca
n00b
n00b


Joined: 26 Feb 2004
Posts: 6
Location: Exeter, England

PostPosted: Fri Apr 16, 2004 3:09 pm    Post subject: Reply with quote

It might not be a case of just having the VIA driver in there but also removing the generic support. From the look of dlittlebear's dmesg output, the generic driver is kicking in befor the VIA one and taking control. Recompiling the kernel and deselcting 'generic/default IDE chipset support' and 'Generic PCI IDE Chipset Support' should allow the VIA driver to take over. Worked for me, anyway. Hope it helps.
Back to top
View user's profile Send private message
Titan.
n00b
n00b


Joined: 28 Mar 2004
Posts: 28
Location: Sydney, Australia

PostPosted: Fri Apr 16, 2004 3:25 pm    Post subject: Reply with quote

I have both "Generic PCI bus-master DMA", "Generic PCI IDE Chipset" and "generic/default IDE chipset" support compiled in.
Back to top
View user's profile Send private message
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1612
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Fri Apr 16, 2004 3:32 pm    Post subject: Reply with quote

You shouldn't need this option in the kernel.
Code:

Use multi-mode by default
CONFIG_IDEDISK_MULTI_MODE:                                               │
│                                                                         │
│ If you get this error, try to say Y here:                               │
│                                                                         │
│ hda: set_multmode: status=0x51 { DriveReady SeekComplete Error }        │
│ hda: set_multmode: error=0x04 { DriveStatusError }                      │
│                                                                         │
│ If in doubt, say N.


This is the other option you have that is different than my config and you shouldn't need it either.
Code:

IDE Taskfile Access
│ CONFIG_IDE_TASK_IOCTL:                                                  │
│                                                                         │
│ This is a direct raw access to the media.  It is a complex but          │
│ elegant solution to test and validate the domain of the hardware and    │
│ perform below the driver data recover if needed.  This is the most      │
│ basic form of media-forensics.                                          │
│                                                                         │
│ If you are unsure, say N here.


Try disabling both of these in your kernel config under:
Device Drivers>ATA/ATAPI/MFM/RLL support.
Back to top
View user's profile Send private message
rebecca
n00b
n00b


Joined: 26 Feb 2004
Posts: 6
Location: Exeter, England

PostPosted: Fri Apr 16, 2004 3:35 pm    Post subject: Reply with quote

Titan. wrote:
I have both "Generic PCI bus-master DMA", "Generic PCI IDE Chipset" and "generic/default IDE chipset" support compiled in.


I'm mainly going by what's been said here, which is the information I used to get DMA working for me and seems to be describing a similar situation. Either way, the lack of "generic/default IDE chipset support" and "Generic PCI IDE Chipset Support" doesn't seem to be causing any problems on this computer and the VIA driver is handling things fine.
Back to top
View user's profile Send private message
dlittlebear
n00b
n00b


Joined: 16 Apr 2004
Posts: 4

PostPosted: Sat Apr 17, 2004 12:05 am    Post subject: Reply with quote

did the suggestion mentioned about killing the other ide option and recompiling the kernel. Nothing, new results.


# hdparm -d1 /dev/hdd

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

# hdparm -tT /dev/hdd

/dev/hdd:
Timing buffer-cache reads: 476 MB in 2.01 seconds = 236.85 MB/sec
Timing buffered disk reads: 8 MB in 3.97 seconds = 2.02 MB/sec

# cat /usr/src/linux/.config | grep DMA | grep -v "#"
CONFIG_GENERIC_ISA_DMA=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_IDEDMA_ONLYDISK=y
CONFIG_BLK_DEV_ADMA=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y


# cat /usr/src/linux/.config | grep VIA82CXX | grep -v "#"
CONFIG_BLK_DEV_VIA82CXXX=y
# cat /usr/src/linux/.config | grep IDE | grep -v "#"
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_IDEDMA_ONLYDISK=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y

# dmesg | grep ide
BIOS-provided physical RAM map:
CPU: After generic identify, caps: 0183fbff c1c7fbff 00000000 00000000
CPU: After vendor identify, caps: 0183fbff c1c7fbff 00000000 00000000
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
/dev/ide/host0/bus0/target0/lun0: p1
/dev/ide/host1/bus0/target0/lun0: unknown partition table
/dev/ide/host1/bus0/target1/lun0: p1 p2 p3
VP_IDE: port 0x01f0 already claimed by ide0
VP_IDE: port 0x0170 already claimed by ide1
ide2: BM-DMA at 0xe400-0xe407, BIOS settings: hde:pio, hdf:DMA
ide3: BM-DMA at 0xe408-0xe40f, BIOS settings: hdg:DMA, hdh:DMA

the last 2 lines here are my PCI IDE controller.


# dmesg | grep IDE
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
VP_IDE: IDE controller at PCI slot 0000:00:07.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci0000:00:07.1
VP_IDE: port 0x01f0 already claimed by ide0
VP_IDE: port 0x0170 already claimed by ide1
VP_IDE: neither IDE port enabled (BIOS)
PDC20267: IDE controller at PCI slot 0000:00:11.0

the last line here is my PCI IDE controller.


slightly faster on the hdparm -tT but no where near where I need it.
Back to top
View user's profile Send private message
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1612
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Sat Apr 17, 2004 2:52 am    Post subject: Reply with quote

That has the highpoint raid chipset right? Are you using the drive on that conroller perhaps? If so you need CONFIG_BLK_DEV_HPT366 enabled in your kernel.

Also I noticed the drive is /dev/hdd which should mean it's on the 4th ide channel? Where are you cd drive(s)? Your drive isn't slaved off of a cdrom is it? Your dmesg output for the ide stuff is different than mine too. *edit Ok saw you did a grep IDE and ide.

Code:

dmesg | grep -i ide
BIOS-provided physical RAM map:
CPU:     After generic identify, caps: 0383fbff c1cbfbff 00000000 00000000
CPU:     After vendor identify, caps: 0383fbff c1cbfbff 00000000 00000000
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt8233 (rev 00) IDE UDMA100 controller on pci0000:00:11.1
    ide0: BM-DMA at 0xdc00-0xdc07, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xdc08-0xdc0f, BIOS settings: hdc:DMA, hdd:DMA
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
 /dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 > p3
 /dev/ide/host0/bus0/target1/lun0: p1 p2 p3
Back to top
View user's profile Send private message
dlittlebear
n00b
n00b


Joined: 16 Apr 2004
Posts: 4

PostPosted: Sat Apr 17, 2004 3:16 am    Post subject: Reply with quote

not even using the PCI IDE controller yet. Tried, but failed. edited lilo and fstab but have to do more work than what I thought. The HDD /dev/hdd was slaved off the dvdrw drive. The onboard chipset is via, the PCI one is promise controller, I have recompiled the kernel to support that. After looking at this more it looks like I need to disable IDE yet have the via portion take its place. been though the kernel a few hrs now and recompiled more than 5x trying stuff.
Back to top
View user's profile Send private message
npaust
n00b
n00b


Joined: 23 Apr 2004
Posts: 70
Location: Walla Walla, WA

PostPosted: Wed Apr 28, 2004 10:19 pm    Post subject: Reply with quote

I had the same problem with performance down around 1.96 MB/s transfer rates. My dmesg looked just like the poster's with the same errors about the generic IDE driver not letting the via driver work.

Recompiling the kernel and removing the generic IDE driver resulted in my writes going up to the 26 MB/s range.

And for reference, I'm using an 800 MHz VIA mini-itx motherboard.
Back to top
View user's profile Send private message
dyqik
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2003
Posts: 120
Location: Oxford, UK

PostPosted: Fri May 07, 2004 1:06 pm    Post subject: Reply with quote

I had a problem getting DMA working on my new Vaio V505DP.

Originaly I had compiled in all the chipsets as modules, as well as the Generic driver above.

Compiling in the Intel ICH driver and leaving out the Generic drive in my kernel (2.6.5-gentoo-r1) as describe above fixed that problem.
Back to top
View user's profile Send private message
69_rs_ss
n00b
n00b


Joined: 26 Dec 2003
Posts: 65
Location: NY, USA

PostPosted: Wed May 12, 2004 3:06 am    Post subject: Reply with quote

I'm having the same problem with my drives but it is using the Nforce2 chipset. I have tried all the suggestions above but none have worked. Does anyone know how to get this working since I am even getting a message about it while I am booting up.
Back to top
View user's profile Send private message
seringen
Apprentice
Apprentice


Joined: 03 Aug 2003
Posts: 163
Location: berkeley, california

PostPosted: Wed May 12, 2004 9:19 pm    Post subject: Reply with quote

thank you thank you thank you.
getting rid of generic ide support really helped

this took me from a disk read of ~4MB/s to ~18MB/s on my old laptop. Nothing to write home about, but definitely better than it was.

I've known a number of people with this problem, hopefully more people will notice this.

thanks again!
Back to top
View user's profile Send private message
possumjc
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2002
Posts: 75
Location: Charleston, SC

PostPosted: Fri May 14, 2004 12:18 am    Post subject: Reply with quote

dlittlebear,
The line from your dmesg output:
Code:
VP_IDE: neither IDE port enabled (BIOS)

indicates that you have the VIA IDE controller disabled in the BIOS. Double check that (should be under Integrated Peripherals or some such) and then you should have DMA support. Also I read that you had /dev/hdd as a slave device. You might want to move it to primary master unless you dual boot or something. Also, having it on the same channel as a CD/DVD writer will make writing slower since PATA devices can not read/write to multiple devices at the same time if they are on the same channel.

Regards,
Joel
Back to top
View user's profile Send private message
69_rs_ss
n00b
n00b


Joined: 26 Dec 2003
Posts: 65
Location: NY, USA

PostPosted: Thu May 20, 2004 2:46 pm    Post subject: Reply with quote

Is there a way to check the kernel settings off the livecd. Using the livecd I have DMA turned on but after install it keeps erroring. I wanted to see if I was missing something.
Back to top
View user's profile Send private message
possumjc
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2002
Posts: 75
Location: Charleston, SC

PostPosted: Thu May 20, 2004 3:53 pm    Post subject: Reply with quote

69_rs_ss,
What settings are you wanting to check? You can run dmesg to see the output of the kernel buring boot. You can also run hdaparm off of the live CD to check drive settings.

Regards,
Joel
Back to top
View user's profile Send private message
69_rs_ss
n00b
n00b


Joined: 26 Dec 2003
Posts: 65
Location: NY, USA

PostPosted: Thu May 20, 2004 7:37 pm    Post subject: Reply with quote

Ok, I figured it out. I was trying to recompile the kernel but I forgot to mount /boot when copying the new kernel over. Once I mounted it, DMA turned on fine. Thanks for the help.
Back to top
View user's profile Send private message
ufoq
n00b
n00b


Joined: 25 Mar 2004
Posts: 33

PostPosted: Fri May 21, 2004 10:41 am    Post subject: Reply with quote

69_rs_ss wrote:
Ok, I figured it out. I was trying to recompile the kernel but I forgot to mount /boot when copying the new kernel over. Once I mounted it, DMA turned on fine. Thanks for the help.


Yes. What a clever idea. Why i didn't thought about it earlier :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum