View previous topic :: View next topic |
Author |
Message |
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Mon Dec 13, 2004 8:58 pm Post subject: HDIO_SET_DMA failed: Operation not permitted |
|
|
Hello Everyone,
I am trying to enable dma on my cdrom
localhost ~ # hdparm -d 1 /dev/hdc
/dev/hdc:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
I am using a GA-8IPE1000 motherboard , chipset is Intel i865PE , ATAPI cdrom LG GCE-8525B. Perhaps something is wrong with my kernel config, but I have no idea what. DMA support ( I think ) is enabled.
Kernel is 2.6.9-r9. Thanks. Config is at http://www.jec-bg.com/ivan/config
Last edited by IvanYosifov on Tue Dec 14, 2004 8:55 am; edited 1 time in total |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 13, 2004 9:27 pm Post subject: |
|
|
A friendly word of advice: posting a full kernel config like you just did practically ensures that not too many people will take the time needed to sift through it.
At least half the reason I responded at all was to tell you this.
Put it on a web site somewhere, or snip the relevant bits, but unless asked to or absolutely desparate don't post 500-line config files!
Nobody will thank you for it.
Really.
Seriously.
No, really.
Really really.
Now then, onto your plight: don't think you have enabled DMA in the BIOS - make sure of it.
You can always see this on startup when the summary screen scrolls by - just pause it to take a good look.
And - the CD drive ?
How do you know it does DMA in the first place ? _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Mon Dec 13, 2004 9:41 pm Post subject: |
|
|
what would be the output of
Code: |
hdparm -i /dev/hdc
hdparm -i /dev/hdd
|
Last edited by alkan on Tue Dec 14, 2004 9:19 am; edited 1 time in total |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Tue Dec 14, 2004 9:21 am Post subject: |
|
|
localhost / # hdparm -i /dev/hda
/dev/hda: No such device or address
The harddisk is a SATA drive and is /dev/sda
localhost / # hdparm -i /dev/hdc
/dev/hdc:
Model=HL-DT-ST GCE-8526B, FwRev=1.02, SerialNo=
Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=yes, tPIO={min:227,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2
AdvancedPM=no
Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a:
* signifies the current active mode
I dont why this says that udma is enabled. It does not seem so:
localhost / # hdparm -t /dev/hdc
/dev/hdc:
Timing buffered disk reads: 8 MB in 3.04 seconds = 2.63 MB/sec |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Tue Dec 14, 2004 10:19 am Post subject: |
|
|
can you please post output of "lspci" and "lspci -n" _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Tue Dec 14, 2004 10:25 am Post subject: |
|
|
localhost / # lspci
0000:00:00.0 Host bridge: Intel Corp. 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
0000:00:01.0 PCI bridge: Intel Corp. 82865G/PE/P PCI to AGP Controller (rev 02)
0000:00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
0000:00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
0000:00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3 (rev 02)
0000:00:1d.3 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
0000:00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev c2)
0000:00:1f.0 ISA bridge: Intel Corp. 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
0000:00:1f.2 IDE interface: Intel Corp. 82801EB (ICH5) SATA Controller (rev 02)
0000:00:1f.3 SMBus: Intel Corp. 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
0000:01:00.0 VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX 440 AGP 8x] (rev c1)
0000:02:09.0 Ethernet controller: Marvell Technology Group Ltd. Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (rev 13)
localhost / # lspci -n
0000:00:00.0 Class 0600: 8086:2570 (rev 02)
0000:00:01.0 Class 0604: 8086:2571 (rev 02)
0000:00:1d.0 Class 0c03: 8086:24d2 (rev 02)
0000:00:1d.1 Class 0c03: 8086:24d4 (rev 02)
0000:00:1d.2 Class 0c03: 8086:24d7 (rev 02)
0000:00:1d.3 Class 0c03: 8086:24de (rev 02)
0000:00:1d.7 Class 0c03: 8086:24dd (rev 02)
0000:00:1e.0 Class 0604: 8086:244e (rev c2)
0000:00:1f.0 Class 0601: 8086:24d0 (rev 02)
0000:00:1f.2 Class 0101: 8086:24d1 (rev 02)
0000:00:1f.3 Class 0c05: 8086:24d3 (rev 02)
0000:00:1f.5 Class 0401: 8086:24d5 (rev 02)
0000:01:00.0 Class 0300: 10de:0181 (rev c1)
0000:02:09.0 Class 0200: 11ab:4320 (rev 13) |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Tue Dec 14, 2004 10:43 am Post subject: |
|
|
I dont know for sure. The SATA disk is /dev/sda and the cdrom is /dev/hdc (not sdX) , so I suppose it is connected NOT through SATA. How do I check this ? |
|
Back to top |
|
|
Zyne Guru
Joined: 08 Jun 2004 Posts: 334
|
Posted: Tue Dec 14, 2004 11:22 am Post subject: |
|
|
I was having the exact same problem a few weeks ago, but I managed to solve this somehow...
a few things that come to mind right now:
1. do you have hdparm set to start on boot?
Code: |
bash-2.05b# rc-update show |grep hdparm
hdparm | boot
|
2. have you edited /ect/conf.d/hdparm to set the right parameters?
here's what mine says:
Code: |
all_args="-d1"
hda_args="-d1 -X69"
hdb_args="-d1 -X69"
sda_args="-d1 -X70"
|
that's about all I can think of right now... |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Tue Dec 14, 2004 12:00 pm Post subject: |
|
|
I added hdparm to the boot runlevel. My conf is just:
I did a reboot and got "DIO_SET_DMA failed: Operation not permitted" during startup.
Quote: |
I was having the exact same problem a few weeks ago, but I managed to solve this somehow...
|
Did you touch the kernel or BIOS as part of the solution ?
I just found one more thing:
Code: |
localhost / # hdparm -i /dev/sda
/dev/sda:
HDIO_GET_IDENTITY failed: Operation not supported
|
Doesn't hdparm work on SATA drives ? |
|
Back to top |
|
|
Zyne Guru
Joined: 08 Jun 2004 Posts: 334
|
Posted: Tue Dec 14, 2004 2:03 pm Post subject: |
|
|
IvanYosifov wrote: |
Did you touch the kernel or BIOS as part of the solution ?
I just found one more thing:
Code: |
localhost / # hdparm -i /dev/sda
/dev/sda:
HDIO_GET_IDENTITY failed: Operation not supported
|
Doesn't hdparm work on SATA drives ? |
nope... I hardly ever touch the bios, since it's set at it's best values imho
as for the kernel... I might have changed a few things, but I don't remember changing anything. I've compiled a few kernels to get vesafb going, but even that's running good now
as for hdparm: I'm getting the exact same error now, but since the data transfer on the hd seems good enough to me, I'm not going to check up on that right now. I *think* hdparm used to work great with my old love-kernel, but in a stupid "update & clean up" situation, I got rid of all my old kernels (including the love one ) |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Tue Dec 14, 2004 8:53 pm Post subject: |
|
|
Zyne,
What hardware are you running ?
Please send me your kernel config at ivan@yosifov.net .
Thanks. |
|
Back to top |
|
|
Zyne Guru
Joined: 08 Jun 2004 Posts: 334
|
Posted: Wed Dec 15, 2004 12:37 am Post subject: |
|
|
IvanYosifov wrote: | Zyne,
What hardware are you running ?
Please send me your kernel config at ivan@yosifov.net .
Thanks. |
mobo: A7N8X-deluxe (SIL3112A chipset)
hardware: 1 SATA hd (Western Digital) 2 ATA100 hd's (IBM)
sending you the kernel config in a few seconds... |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Wed Dec 15, 2004 9:22 am Post subject: |
|
|
Got your mail , thanks Will test it later today. In the meantime - I have tested 2004.3 and 2004.2 LiveCDs - they dont work. |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Thu Dec 16, 2004 9:28 am Post subject: |
|
|
I have reconfigured my kernel.
The config is at http://yosifov.net/ivan/config1.
It should be analougus to zyne's and obviosly correct(TM) . DMA still failing.
I may have found the problem. I have this in my dmesg :
Code: | ata_piix: combined mode detected |
Some google-ing showed me that this combined
mode somehow messes up the piix driver. I am still not sure what this is and how to change it.
Any sugestions ? |
|
Back to top |
|
|
Karsten1973 Guru
Joined: 17 Dec 2004 Posts: 303 Location: Berlin, Germany
|
Posted: Fri Dec 17, 2004 9:37 am Post subject: Same Problem here |
|
|
I have the same problem; PIII system on AOpen AX37 Plus Motherboard with a Samsung Spinpoint as hda. Not SATA, the old parallel system. Hard does allow this; DMA is possible under Win98.
I use a 2.6.9 kernel. Any other data that might help to solve the problem?
bash-2.05b# hdparm /dev/hda
/dev/hda:
multcount = 16 (on)
IO_support = 1 (32-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 16383/255/63, sectors = 120060444672, start = 0
bash-2.05b# hdparm -i /dev/hda
/dev/hda:
Model=SAMSUNG SP1213N, FwRev=TL100-24, SerialNo=S00UJ10X602666
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4
BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=234493056
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=no WriteCache=enabled
Drive conforms to: (null):
* signifies the current active mode |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Fri Dec 17, 2004 7:48 pm Post subject: |
|
|
Hello Guys ,
I managed to solve this , at least for me.
This was not a kernel problem after all ,
rather a BIOS one.
Here is some (I hope usefull) explanation.
I had in BIOS->IntegratedPeripherials
When booting the BIOS displays a table of found disk drives. There it told me I had an IDE HD and an IDE CD.
When booting I had the dmesg:
Code: | ata_piix: combined mode detected |
I still dont know what this means , but it appears that either the chip is not capable of DMA in this mode , or the linux drivers cant handle this mode properly. You will get:
Code: | localhost ~ # hdparm -d 1 /dev/hdc
/dev/hdc:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off) |
I changed the BIOS to :
Code: | On-Chip SATA: Manual |
In the previously non-writable next field i place:
Code: | SATA Port 0 configure as: SATA PORT 0 |
The autodetection had previously placed there IDE 1 , which (I think) means that the SATA HD will pretend to be IDE Master 1 (with the CD - Master 2).
In the next reboot I got TWO device tables. One of IDE devices , and only the CD is there , and an other one for SATA devices , and the SATA disk is there.
There combined-mode-message is no longer in dmesg , and:
Code: | localhost / # hdparm -d1 /dev/hdc
/dev/hdc:
setting using_dma to 1 (on)
using_dma = 1 (on) |
The final kernel config is at http://www.yosifov.net/ivan/config_work .
A few words about it :
Code: | obelix@localhost ~ $ grep DMA config
CONFIG_GENERIC_ISA_DMA=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_IVB=y
CONFIG_IDEDMA_AUTO=y |
The generic* options under ATA/ATAPI/MFM/RLL **ARE** enabled. The piix (the controler) modules are also built-in.
I am still not sure what causes the "HDIO_SET_DMA failed" in general , but at least for ICH5 chips - it is the combined mode.
In general - build the controler modules in the kernel ( the generic options dont hurt) and check the BIOS. Look for my-chip-generated-messages in the dmesg.
Thanks everyone for the help ,
Ivan Yosifov.
P.S. Belive it or not , the BIOS-tweak also fixes https://bugs.gentoo.org/show_bug.cgi?id=73876 |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Fri Dec 17, 2004 8:25 pm Post subject: |
|
|
the explanation is:
the IDE piix driver refuses to claim any devices if you are using the libata ich SATA
the libata ich SATA claimed your hard disk, but the bios told the system that the cdrom drive was connected through IDE
the *generic* IDE driver (which doesnt support DMA on many chipsets) was claiming the cdrom _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Karsten1973 Guru
Joined: 17 Dec 2004 Posts: 303 Location: Berlin, Germany
|
Posted: Sat Dec 18, 2004 5:50 pm Post subject: |
|
|
But then why do I have that problem? I don't have SATA drives at all! |
|
Back to top |
|
|
Karsten1973 Guru
Joined: 17 Dec 2004 Posts: 303 Location: Berlin, Germany
|
Posted: Sat Dec 18, 2004 5:59 pm Post subject: |
|
|
Anyway, I did the same with my PATA HD. And - it worked. Seems to be a problem of the BIOS.
Yet, Firebird takes still longer to load on gentoo then on Win98.... |
|
Back to top |
|
|
Karsten1973 Guru
Joined: 17 Dec 2004 Posts: 303 Location: Berlin, Germany
|
Posted: Sat Dec 18, 2004 11:02 pm Post subject: |
|
|
I am not sure if there is a connection, but my Win98 SE died after changing the bios. Trying to copy my data from the vfat partion on my reiserfs linux partion led to many errors. So be carefull ! |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Sun Dec 19, 2004 9:07 am Post subject: |
|
|
For the load time - check out http://www.gentoo.org/doc/en/prelink-howto.xml
And what are these errors you mention ? I have copied my (ex)fat partitions on reiser too , and it was a breeze. |
|
Back to top |
|
|
Karsten1973 Guru
Joined: 17 Dec 2004 Posts: 303 Location: Berlin, Germany
|
Posted: Sun Dec 19, 2004 12:07 pm Post subject: |
|
|
The file system was totally messed. Windows would not boot anymore (it showed the desktop background, but nothing else. Even booting in secure mode would not help. I plugged the disk in another computer and had a win xp scandisk run over it. Now a lot of filenames are crooked, but at least I can read stuff again, right now i copy everything on my reiser partition.
An open question to the developers:
Why does dma work with bios detected drive and liveCD kernel but not with a regular 2.6.9 gentoo-dev kernel? |
|
Back to top |
|
|
IvanYosifov l33t
Joined: 15 Oct 2004 Posts: 778 Location: Bulgaria
|
Posted: Sun Dec 19, 2004 12:30 pm Post subject: |
|
|
Dumb WindoZe . Probably the fs was all right and when win booted - win killed it. You should have booted in directly into gentoo.
I didn't have DMA even with the LiveCD.
Have you configured your kernel yourself ?
If this is the case , it should be very different from the LiveCD anyway.
AFAIK you can use sys-kernel/genkernel to generate a LiveCD-like kernel for the system.
You might want to try this , consult the install handbook on how to use genkernel.
Ivan Yosifov. |
|
Back to top |
|
|
|