View previous topic :: View next topic |
Author |
Message |
dostro n00b
Joined: 28 Apr 2002 Posts: 8
|
Posted: Sun Apr 28, 2002 4:37 am Post subject: Hdparm, devfs and scsiemulated idedevices |
|
|
How do I for an example set dma on these? When I did not use devfs, I could use /dev/hdc to set dma=on etc, but how do I do now? _________________ http://www.ondska.com |
|
Back to top |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Sun Apr 28, 2002 4:40 am Post subject: |
|
|
Might want to browse through: https://forums.gentoo.org/viewtopic.php?t=51 _________________ - Kyle Manna
Please, please SEARCH before posting.
There are three kinds of people in the world: those who can count, and those who can't. |
|
Back to top |
|
|
sven Apprentice
Joined: 19 Apr 2002 Posts: 274
|
Posted: Sun Apr 28, 2002 7:55 am Post subject: |
|
|
You should check what chipset your motherboard's using and compile this chipset support into the kernel. Then DMA should be automaticly set by the kernel to all drives supporting it. I think this is a safer way instead of using hdparm. |
|
Back to top |
|
|
Cr0t l33t
Joined: 27 Apr 2002 Posts: 944 Location: USA
|
Posted: Sun Apr 28, 2002 8:15 am Post subject: |
|
|
HDPARM can be really dangerous... watch out what u are doing. start a research first then use HDPARM! _________________ cya |
|
Back to top |
|
|
dostro n00b
Joined: 28 Apr 2002 Posts: 8
|
Posted: Sun Apr 28, 2002 12:03 pm Post subject: |
|
|
Well, the problem is not how to set dma, it is how to set dma on scsiemulated devices, though hdparm does not like these...
$ hdparm -c1d1 /dev/cdroms/cdrom0
/dev/cdroms/cdrom0 not supported by hdparm _________________ http://www.ondska.com |
|
Back to top |
|
|
dostro n00b
Joined: 28 Apr 2002 Posts: 8
|
Posted: Sun Apr 28, 2002 1:07 pm Post subject: |
|
|
In slackware ( not using devfs ) I solved it by setting hdparm to /dev/hdc instread, which worked fine. Now I don't know what to do... _________________ http://www.ondska.com |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Sun Apr 28, 2002 6:38 pm Post subject: Possible solution? |
|
|
You've touched upon a very interesting problem here! Well I had a look through Google Groups and many other people seem to be asking the same question. It does only seem to be a problem with devfs (perhaps Richard Gooch should be informed, and the developer of hdparm?). Anyway, I gather that it is still possible to manipulate the IDE paramaters by outputting to the /proc interface. For example, to turn on DMA for /dev/hdc try this:
echo "using_dma:1" > /proc/ide/hdc/settings
You can get a list of all the possible settings (and their current values) by typing:
cat /proc/ide/hdc/settings
Here are a few handy ones, plus the equivalent hdparm switch:
-u -> unmaskirq
-X -> current_speed
-d -> using_dma
-c -> io_32bit
Bear in mind, that I have not tested this so please let me know what happens! |
|
Back to top |
|
|
dostro n00b
Joined: 28 Apr 2002 Posts: 8
|
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Mon Apr 29, 2002 11:57 am Post subject: Funny, it works for me ... |
|
|
This is strange, because it works for me ... you did try it when logged in
as root rather than an ordinary user? You'll get a permission denied error message otherwise. And you have full proc filesystem support compiled into your kernel? Try putting the line in /etc/rc.d/local (in a similar manner to the other stuff below ...)
I can see that the other (messy) technique referred to in the link should work, but I'm not able to test it at the moment (my kernel isn't set up suitably). The last time I used SCSI emulation in Linux, it was specified as a kernel boot time option in the bootloader (LILO or Grub), which could be problematic. I guess if ide-scsi is used in the context of a loadable module, then this way is OK. I would be inclined to do it this way:
1) Ensure none of the SCSI modules are autoloading
2) Add an hdparm line (in /etc/rc.d/local in the start() section)
3) Add a modprobe ide-scsi (in the same section)
It should be possible to pass a parameter on the modprobe line to tell the ide-scsi module only to use /dev/hdc so it doesn't take over your hard disk as well (unless that's what you want).
Sorry this is all a bit theoretical, if I actually get this working I'll be sure to post ...[/quote] |
|
Back to top |
|
|
dostro n00b
Joined: 28 Apr 2002 Posts: 8
|
Posted: Mon Apr 29, 2002 12:57 pm Post subject: |
|
|
I made the changes to /proc/ide/hdc/settings as root. I also have /procfilesystem compiled into the kernel.
To get the scsiemulation to work, I have compiled Scsi generic support, Scsi Cdromsupport and Scsi-emulationsupport into the kernel, so to use the ide-cd module I have to modprobe this in an early bootup stage, but that's all i know. _________________ http://www.ondska.com |
|
Back to top |
|
|
smtanner Tux's lil' helper
Joined: 12 May 2002 Posts: 106 Location: Colorado
|
Posted: Tue May 21, 2002 3:41 am Post subject: |
|
|
Hey kerframil,
Your solution worked great for me. My dvd was using scsi emulation so I could copy on the fly, but dvd playback was terrible. Switching on dma using your technique did the trick. Any suggestion on what file I could put this in so it gets done at startup.
thanks |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Tue May 21, 2002 11:50 am Post subject: Re: automatic configuration on startup |
|
|
Quote: | Any suggestion on what file I could put this in so it gets done at startup. |
I would put it in your /etc/conf.d/local.start file. Note that there is a corresponding local.stop file, which is nice if you need to close or undo certain things upon shutdown - obviously that isn't relevant here.
Hey dostro, did you ever find a solution for your predicament? |
|
Back to top |
|
|
rommel Veteran
Joined: 19 Apr 2002 Posts: 1145 Location: Williamsburg Virginia
|
Posted: Tue May 21, 2002 9:32 pm Post subject: |
|
|
sorry to crash your thread but i was checking out my system and when i cat /proc/ide/hdc/settings i see that dma is set to 1 which is on yes?...but hdparm doesnt recognize it as it is set to scsi since it is a burner...but that would be normal right?
oh and btw kerframil....freebsd is pretty cool...kinda like the father of gentoo in a way...i was able to bumble my way through the install and then a make build and install of world after cvsup'ing the src... have ports installed and updated....built and installed a custom kernel....X is compiled and i am waiting for gnome 2 for the desktop environment since i have kde3 on gentoo...anyway just thought i would blab...lol
uh one other question if i might...i just ran hdparm on my dvd player /dev/hda and it is set to udma4 but gives only 2.90mb/s read transfer rates...my hard drives /dev/md0 are getting 81mb/s.....shouldnt the dvd player be alot higher then it is....it does work though..like in ogle
ciao |
|
Back to top |
|
|
|