Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hdparm, devfs and scsiemulated idedevices
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
dostro
n00b
n00b


Joined: 28 Apr 2002
Posts: 8

PostPosted: Sun Apr 28, 2002 4:37 am    Post subject: Hdparm, devfs and scsiemulated idedevices Reply with quote

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
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Sun Apr 28, 2002 4:40 am    Post subject: Reply with quote

Might want to browse through: http://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
View user's profile Send private message
sven
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 274

PostPosted: Sun Apr 28, 2002 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Cr0t
l33t
l33t


Joined: 27 Apr 2002
Posts: 881
Location: USA

PostPosted: Sun Apr 28, 2002 8:15 am    Post subject: Reply with quote

HDPARM can be really dangerous... watch out what u are doing. start a research first then use HDPARM!
_________________
cya
    ©®0t
Back to top
View user's profile Send private message
dostro
n00b
n00b


Joined: 28 Apr 2002
Posts: 8

PostPosted: Sun Apr 28, 2002 12:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
dostro
n00b
n00b


Joined: 28 Apr 2002
Posts: 8

PostPosted: Sun Apr 28, 2002 1:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
kerframil
l33t
l33t


Joined: 19 Apr 2002
Posts: 710
Location: London, UK

PostPosted: Sun Apr 28, 2002 6:38 pm    Post subject: Possible solution? Reply with quote

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:

:arrow: echo "using_dma:1" > /proc/ide/hdc/settings

You can get a list of all the possible settings (and their current values) by typing:

:arrow: 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
View user's profile Send private message
dostro
n00b
n00b


Joined: 28 Apr 2002
Posts: 8

PostPosted: Sun Apr 28, 2002 8:25 pm    Post subject: Reply with quote

Thanks for the response!
I tried your solution, no success.

I found this though...
http://www.geocrawler.com/archives/3/35/2001/2/0/5251986/

The problem is, I do not know in which file to load ide-cd, set dma and the rmmod ide-cd ...Any advice?
_________________
http://www.ondska.com
Back to top
View user's profile Send private message
kerframil
l33t
l33t


Joined: 19 Apr 2002
Posts: 710
Location: London, UK

PostPosted: Mon Apr 29, 2002 11:57 am    Post subject: Funny, it works for me ... Reply with quote

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
View user's profile Send private message
dostro
n00b
n00b


Joined: 28 Apr 2002
Posts: 8

PostPosted: Mon Apr 29, 2002 12:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
smtanner
Tux's lil' helper
Tux's lil' helper


Joined: 12 May 2002
Posts: 106
Location: Colorado

PostPosted: Tue May 21, 2002 3:41 am    Post subject: Reply with quote

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
View user's profile Send private message
kerframil
l33t
l33t


Joined: 19 Apr 2002
Posts: 710
Location: London, UK

PostPosted: Tue May 21, 2002 11:50 am    Post subject: Re: automatic configuration on startup Reply with quote

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
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1140
Location: Williamsburg Virginia

PostPosted: Tue May 21, 2002 9:32 pm    Post subject: Reply with quote

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
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