You are not logged in.

#1 2003-02-26 23:29:47

Luis Q. R.
Member
Registered: 2003-02-20
Posts: 106

hdparm

I could set multcount to 16 and I/O support to 32-bit, but I cannot set DMA on, hdparm returns this error:

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

What happened?

Offline

#2 2003-02-27 06:23:34

Nickm
Member
From: Netherlands
Registered: 2003-02-25
Posts: 106

Re: hdparm

are you root ??

Offline

#3 2003-02-27 12:02:18

Luis Q. R.
Member
Registered: 2003-02-20
Posts: 106

Re: hdparm

I couldn't do the other two things if I wasn't.

Offline

#4 2003-02-27 15:00:47

Arielext
Member
From: Amersfoort, the Netherlands
Registered: 2002-08-12
Posts: 362
Website

Re: hdparm

is dma enabled in your bios?
I know stupid question, but that is my job over here, asking the most silly questions smile


apt-get install arch

Offline

#5 2003-02-27 16:53:52

Luis Q. R.
Member
Registered: 2003-02-20
Posts: 106

Re: hdparm

I've checked it, I don't find anything related to dma in the bios. Anyway, I have dma enabled in my windows partition, with no problems. While I was using Red Hat 7.2, hdparm enabled dma by default after installation. But Red Hat 8.0 gave me the same problem, not allowing me to set dma in the hard drive.

Hey, I've been thinking about setting scsi emulation in the hard drive. After setting it for the dvd I've noticed that it works faster for dvd movies. Would it have the same effect for hda?

Offline

#6 2003-02-27 18:23:54

jlvsimoes
Member
From: portugal
Registered: 2002-12-23
Posts: 392
Website

Re: hdparm

it may sound strange but if you got a via chipset it can be a litle bug i gor the same problem seting dma on my via system to fix i got pre4-ac something and compile a kernel after that my pc works just fine using dma


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------

Offline

#7 2003-02-27 19:34:13

Luis Q. R.
Member
Registered: 2003-02-20
Posts: 106

Re: hdparm

Hells, I've got a VIA chipset. What's that pre4-ac you're talking about?

Offline

#8 2003-02-27 21:03:28

jlvsimoes
Member
From: portugal
Registered: 2002-12-23
Posts: 392
Website

Re: hdparm

its a kernel patch latest prepatch is 2.4.21-pre5
and the ac patch is on 2.4.21-pre4-ac7 you can find them on www.kernel.org
now for your problem just get the 2.4.20 kernel sources patch them using the 2.4.21-pre5 configure it and if your " bug " is similar to mine the problem is solved but take your time configuring the kernel


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------

Offline

#9 2003-02-28 00:35:13

BluPhoenyx
Member
Registered: 2002-12-23
Posts: 239

Re: hdparm

Not wanting to step on any toes here but it is possible to use the VIA chipset w/o having kernel patches. I have used this chipset on many motherboards w/o problems. Generally, I don't let the kernel automatically set the dma on but I do have it set the chipset to allow dma access then use hdparm to make the settings myself. The primary concerns with VIA and the kernel are the VP2 chipsets, AFAIK.

While I have nothing against patched kernels (I use one on a Win4Lin system) and especially Alan Cox's patches, I think this should be a last resort for most users. IE, you should make sure that this is really the method which you need to follow and all other configuration options are exhausted. My reasoning is, once you start using a patched kernel you lock yourself into a limited kernel upgrade path unless the patches happen to become part of the main kernel sources.


BluPhoenyx

Offline

#10 2003-02-28 18:06:57

jlvsimoes
Member
From: portugal
Registered: 2002-12-23
Posts: 392
Website

Re: hdparm

BluPhoenyx is correct think twice


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------

Offline

#11 2003-03-01 23:03:28

Luis Q. R.
Member
Registered: 2003-02-20
Posts: 106

Re: hdparm

Ok, let's forget about the patch. But please, tell me how do I set the kernel or the chipset to allow the dma access.

What do you have to say about the 2.5 kernel? I want to give it a try.

Offline

#12 2003-03-02 06:43:18

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: hdparm

okay i may be blind but just what do you want to enable dma on? hard drive? dvd/cdrom?


AKA uknowme

I am not your friend

Offline

#13 2003-03-02 15:38:15

Luis Q. R.
Member
Registered: 2003-02-20
Posts: 106

Re: hdparm

For the hard drive, it doesn't go so fast as I want.

Offline

#14 2003-03-02 21:05:28

Arielext
Member
From: Amersfoort, the Netherlands
Registered: 2002-08-12
Posts: 362
Website

Re: hdparm

RH 7.2 works and 8.0 doesn't ?
maybe it's hdparm related.

try the hdpam version shipped with RH7
(get an older version hdparm and try that)


apt-get install arch

Offline

#15 2003-03-02 23:28:47

BluPhoenyx
Member
Registered: 2002-12-23
Posts: 239

Re: hdparm

First things first. We need to know the status of your system before we can really make more accurate statements. Have you compiled your own kernel? If so, did you verify the ide settings for your chipset? I might have mentioned them before but here goes again, just to be safe.

Select the ATA/IDE/MFM/RLL support (on the main menu)

 <*> ATA/IDE/MFM/RLL support (select option then proceed to menu below)
       IDE, ATA and ATAPI Block devices --->

 (necessary options are listed. items not listed are not necessary unless you know
  they are required by your system. some choices have been made for system flexibility.)

   <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
   <*> Include IDE/ATA-2 DISK support
    [ ] Use multi-mode by default  (optional - turn on multi i/o if drive supports this feature I prefer hdparm)

   <M> Include IDE/ATAPI CDROM support (modular in case scsi emulation required)
   <M> SCSI emulation support (for cdrw support mainly - don't forget scsi options)

    [*] Generic PCI IDE chipset support
    [*] Sharing PCI IDE interrupts support (many systems do this quietly)
    [*] Generic PCI bus-master DMA support (Sets the chipsets to allow DMA use)
    [ ] Use PCI DMA by default when available (leave off and set via hdparm for VIA - some BIOS will properly set things anyhow)
    [*] VIA82CXXX chipset support (for the ide chipset)

Now some notes. Make sure that the IDE chipset really is VIA. Some boards are confusing with mixed chipsets. For example I have a board with both VIA and AMD chips. The IDE chipset in this case, is an AMD Viper. You can always add options to support other chipsets if the disk could be used on a different system. For several years I have kept an extra IDE for just such a purpose. I find it easier to work with than developing a cdrom with all the support options and tools I needed, especially since things change so often. This method works great on a workbench setup.

Be sure to run the benchmark and info test to verify the settings and changes in the drive data. Both tests are useful. The raw data can give info which you may not see otherwise. The first command is for INFO and the second is for TESTS. Yes, the hda device links work once the system is running properly but you could use the proper device names also.

hdparm -iI /dev/hda (to test buffered and unbuffered data)
hdparm -tT /dev/hda (reads drive info, formatted and raw)

You state the hard drive doesn't go as fast as you want. How do you know? Did you test this or is it simply by usage?

All I can really say about the beta kernels is be careful if you use it on a system which has real data. You may never have trouble. I often used the 2.3 and 2.4 (early betas) on my system although I would never have done so on a client's PC. Mine tended to be a test system. I also like using a 'throw away' installation on an older hd. If you don't have older hardware you can often pick a used ide up at Linux user groups or mom&pop PC shops pretty cheap.


BluPhoenyx

Offline

#16 2003-03-02 23:30:04

jlvsimoes
Member
From: portugal
Registered: 2002-12-23
Posts: 392
Website

Re: hdparm

You can try to append that option to the kernel-using lilo
I set mine like this

/etc/lilo.conf
#
# /etc/lilo.conf
#

boot=/dev/discs/disc0/disc
default=2.4.21-pre5
timeout=50
append = "hdd=ide-scsi ide1=dma ide0=dma idebus=33"
verbose = "1"

So I am telling the kernel to use dma on my cdrw and mi DVD player


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------

Offline

#17 2003-03-03 18:07:43

Luis Q. R.
Member
Registered: 2003-02-20
Posts: 106

Re: hdparm

I fixed it, I don't know if it was because of the patch or the "VIA82CXXX chipset support" option, but now it works. Thank you very much.

Offline

#18 2003-03-04 00:13:06

BluPhoenyx
Member
Registered: 2002-12-23
Posts: 239

Re: hdparm

Great.

If the VIA option was off that was probably it because the kernel had no code to support that chipset with anything other than generic IDE which is generally slow.

FWIW, I just put the generic AL 2.4.20 (read unpatched source) on a system with a VIA chipset and a 30 bg IDE. So far this works great here.


BluPhoenyx

Offline

Board footer

Powered by FluxBB