* Checking module parameters
@ 2009-01-17 22:26 David Wagner
2009-01-17 23:47 ` Alexey Dobriyan
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: David Wagner @ 2009-01-17 22:26 UTC (permalink / raw)
To: linux-kernel
Is there a way to tell what options have been applied to a currently
loaded kernel module?
I'm trying to force libata to use 1.5Gbps rather than 3Gbps, so I created
a file /etc/modprobe.d/local containing:
options libata force=1.5Gbps
However my SATA drive gets loaded at 3Gbps. I'm trying to figure out how
to debug this so that I can tell whether the option got correctly applied
to the libata module, and if not, how to force the SATA link to 1.5Gbps.
Any suggestions or ideas?
(I can't set libata.force=1.5Gbps as a kernel argument because on my
Fedora kernel, libata is loaded as a module rather than built into the
kernel. I can't run "modprobe libata force=1.5Gbps" by hand because
I've got SATA drives, so the libata module is automatically loaded before
I get shell access.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Checking module parameters
2009-01-17 22:26 Checking module parameters David Wagner
@ 2009-01-17 23:47 ` Alexey Dobriyan
2009-01-18 0:22 ` Robert Hancock
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Alexey Dobriyan @ 2009-01-17 23:47 UTC (permalink / raw)
To: David Wagner; +Cc: linux-kernel
On Sun, Jan 18, 2009 at 1:26 AM, David Wagner <daw@cs.berkeley.edu> wrote:
> Is there a way to tell what options have been applied to a currently
> loaded kernel module?
/sys/module/[module name]/parameters/ (if i remember correctly)
> I'm trying to force libata to use 1.5Gbps rather than 3Gbps, so I created
> a file /etc/modprobe.d/local containing:
> options libata force=1.5Gbps
> However my SATA drive gets loaded at 3Gbps. I'm trying to figure out how
> to debug this so that I can tell whether the option got correctly applied
> to the libata module, and if not, how to force the SATA link to 1.5Gbps.
> Any suggestions or ideas?
>
> (I can't set libata.force=1.5Gbps as a kernel argument because on my
> Fedora kernel, libata is loaded as a module rather than built into the
> kernel. I can't run "modprobe libata force=1.5Gbps" by hand because
> I've got SATA drives, so the libata module is automatically loaded before
> I get shell access.)
This may not work if libata module is loaded from initrd.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Checking module parameters
2009-01-17 22:26 Checking module parameters David Wagner
2009-01-17 23:47 ` Alexey Dobriyan
@ 2009-01-18 0:22 ` Robert Hancock
2009-01-18 15:59 ` Yanko Kaneti
2009-01-18 18:58 ` Alan Cox
3 siblings, 0 replies; 9+ messages in thread
From: Robert Hancock @ 2009-01-18 0:22 UTC (permalink / raw)
To: David Wagner; +Cc: linux-kernel
David Wagner wrote:
> Is there a way to tell what options have been applied to a currently
> loaded kernel module?
>
> I'm trying to force libata to use 1.5Gbps rather than 3Gbps, so I created
> a file /etc/modprobe.d/local containing:
> options libata force=1.5Gbps
> However my SATA drive gets loaded at 3Gbps. I'm trying to figure out how
> to debug this so that I can tell whether the option got correctly applied
> to the libata module, and if not, how to force the SATA link to 1.5Gbps.
> Any suggestions or ideas?
>
> (I can't set libata.force=1.5Gbps as a kernel argument because on my
> Fedora kernel, libata is loaded as a module rather than built into the
> kernel. I can't run "modprobe libata force=1.5Gbps" by hand because
> I've got SATA drives, so the libata module is automatically loaded before
> I get shell access.)
Rebuilding the initrd with that option set should cause the initrd to
pass the option into the libata module when the initrd script loads it.
Unfortunately the current Fedora mkinitrd is broken such that this
doesn't work. I'm rather disappointed by the lack of response to this
bug as it seems like it should be easily resolved and causes serious
problems with debugging certain issues, as you've found. Anyone know who
needs to be hit with a clue-by-four to get this fixed?
https://bugzilla.redhat.com/show_bug.cgi?id=457870
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Checking module parameters
2009-01-17 22:26 Checking module parameters David Wagner
2009-01-17 23:47 ` Alexey Dobriyan
2009-01-18 0:22 ` Robert Hancock
@ 2009-01-18 15:59 ` Yanko Kaneti
2009-01-18 18:58 ` Alan Cox
3 siblings, 0 replies; 9+ messages in thread
From: Yanko Kaneti @ 2009-01-18 15:59 UTC (permalink / raw)
To: linux-kernel
David Wagner <daw <at> cs.berkeley.edu> writes:
> (I can't set libata.force=1.5Gbps as a kernel argument because on my
> Fedora kernel, libata is loaded as a module rather than built into the
> kernel.
That used to be true until module-init-tools-3.5 , i.e. you can in Fedora 10
and rawhide.
Cheers
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Checking module parameters
2009-01-17 22:26 Checking module parameters David Wagner
` (2 preceding siblings ...)
2009-01-18 15:59 ` Yanko Kaneti
@ 2009-01-18 18:58 ` Alan Cox
3 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2009-01-18 18:58 UTC (permalink / raw)
To: David Wagner; +Cc: linux-kernel
> (I can't set libata.force=1.5Gbps as a kernel argument because on my
> Fedora kernel, libata is loaded as a module rather than built into the
> kernel. I can't run "modprobe libata force=1.5Gbps" by hand because
> I've got SATA drives, so the libata module is automatically loaded before
> I get shell access.)
Best to ask on the Fedora lists for fedora specific config help. If I
remember rightly you need to update the module options in the initrd...
Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Checking module parameters
[not found] <bVsVO-15X-19@gated-at.bofh.it>
@ 2009-01-19 9:38 ` Nick Craig-Wood
2009-01-19 10:19 ` Stefan Richter
0 siblings, 1 reply; 9+ messages in thread
From: Nick Craig-Wood @ 2009-01-19 9:38 UTC (permalink / raw)
To: David Wagner; +Cc: linux-kernel
David Wagner <daw@cs.berkeley.edu> wrote:
> Is there a way to tell what options have been applied to a currently
> loaded kernel module?
>
> I'm trying to force libata to use 1.5Gbps rather than 3Gbps, so I created
> a file /etc/modprobe.d/local containing:
> options libata force=1.5Gbps
> However my SATA drive gets loaded at 3Gbps. I'm trying to figure out how
> to debug this so that I can tell whether the option got correctly applied
> to the libata module, and if not, how to force the SATA link to 1.5Gbps.
> Any suggestions or ideas?
>
> (I can't set libata.force=1.5Gbps as a kernel argument because on my
> Fedora kernel, libata is loaded as a module rather than built into the
> kernel. I can't run "modprobe libata force=1.5Gbps" by hand because
> I've got SATA drives, so the libata module is automatically loaded before
> I get shell access.)
I had to do this recently (under debian I ended up putting
"libata force=1.5Gbps" into /etc/modules)
You can check it is working by looking for something like this in the log
[ 2.345058] ata1: FORCE: PHY spd limit set to 1.5Gbps
[ 2.345058] ata1: SATA max UDMA/133 abar m2048@0xfb106000 port 0xfb106100 irq 218
[ 2.345058] ata2: FORCE: PHY spd limit set to 1.5Gbps
[ 2.345058] ata2: SATA max UDMA/133 abar m2048@0xfb106000 port 0xfb106180 irq 218
[ 2.345058] ata3: FORCE: PHY spd limit set to 1.5Gbps
[ 2.345058] ata3: SATA max UDMA/133 abar m2048@0xfb106000 port 0xfb106200 irq 218
[ 2.345058] ata4: FORCE: PHY spd limit set to 1.5Gbps
[ 2.345058] ata4: SATA max UDMA/133 abar m2048@0xfb106000 port 0xfb106280 irq 218
[ 2.345058] ata5: FORCE: PHY spd limit set to 1.5Gbps
[ 2.345058] ata5: SATA max UDMA/133 abar m2048@0xfb106000 port 0xfb106300 irq 218
[ 2.345058] ata6: FORCE: PHY spd limit set to 1.5Gbps
[ 2.345058] ata6: SATA max UDMA/133 abar m2048@0xfb106000 port 0xfb106380 irq 218
--
Nick Craig-Wood <nick@craig-wood.com> -- http://www.craig-wood.com/nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Checking module parameters
2009-01-19 9:38 ` Nick Craig-Wood
@ 2009-01-19 10:19 ` Stefan Richter
2009-01-19 12:44 ` Nick Craig-Wood
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Richter @ 2009-01-19 10:19 UTC (permalink / raw)
To: Nick Craig-Wood; +Cc: David Wagner, linux-kernel
Nick Craig-Wood wrote:
> David Wagner <daw@cs.berkeley.edu> wrote:
>> Is there a way to tell what options have been applied to a currently
>> loaded kernel module?
>>
>> I'm trying to force libata to use 1.5Gbps rather than 3Gbps,
...
> I had to do this recently (under debian I ended up putting
> "libata force=1.5Gbps" into /etc/modules)
>
> You can check it is working by looking for something like this in the log
>
> [ 2.345058] ata1: FORCE: PHY spd limit set to 1.5Gbps
> [ 2.345058] ata1: SATA max UDMA/133 abar m2048@0xfb106000 port 0xfb106100 irq 218
There is also /sys/module/*/parameters/* which can be read and in some
cases even be written.
--
Stefan Richter
-=====-==--= ---= =--==
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Checking module parameters
2009-01-19 10:19 ` Stefan Richter
@ 2009-01-19 12:44 ` Nick Craig-Wood
2009-01-19 13:06 ` Stefan Richter
0 siblings, 1 reply; 9+ messages in thread
From: Nick Craig-Wood @ 2009-01-19 12:44 UTC (permalink / raw)
To: Stefan Richter; +Cc: David Wagner, linux-kernel
On Mon, Jan 19, 2009 at 11:19:34AM +0100, Stefan Richter wrote:
> Nick Craig-Wood wrote:
> > David Wagner <daw@cs.berkeley.edu> wrote:
> >> Is there a way to tell what options have been applied to a currently
> >> loaded kernel module?
> >>
> >> I'm trying to force libata to use 1.5Gbps rather than 3Gbps,
> ...
> > I had to do this recently (under debian I ended up putting
> > "libata force=1.5Gbps" into /etc/modules)
> >
> > You can check it is working by looking for something like this in the log
> >
> > [ 2.345058] ata1: FORCE: PHY spd limit set to 1.5Gbps
> > [ 2.345058] ata1: SATA max UDMA/133 abar m2048@0xfb106000 port 0xfb106100 irq 218
>
> There is also /sys/module/*/parameters/* which can be read and in some
> cases even be written.
It doesn't appear to show the force parameter. From the same server
as above :-
$ more /sys/module/libata/parameters/* | cat
::::::::::::::
/sys/module/libata/parameters/acpi_gtf_filter
::::::::::::::
3
::::::::::::::
/sys/module/libata/parameters/allow_tpm
::::::::::::::
0
::::::::::::::
/sys/module/libata/parameters/ata_probe_timeout
::::::::::::::
7500
::::::::::::::
/sys/module/libata/parameters/atapi_dmadir
::::::::::::::
0
::::::::::::::
/sys/module/libata/parameters/atapi_enabled
::::::::::::::
1
::::::::::::::
/sys/module/libata/parameters/atapi_passthru16
::::::::::::::
1
::::::::::::::
/sys/module/libata/parameters/dma
::::::::::::::
7
::::::::::::::
/sys/module/libata/parameters/fua
::::::::::::::
0
::::::::::::::
/sys/module/libata/parameters/ignore_hpa
::::::::::::::
0
::::::::::::::
/sys/module/libata/parameters/noacpi
::::::::::::::
0
--
Nick Craig-Wood <nick@craig-wood.com> -- http://www.craig-wood.com/nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Checking module parameters
2009-01-19 12:44 ` Nick Craig-Wood
@ 2009-01-19 13:06 ` Stefan Richter
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Richter @ 2009-01-19 13:06 UTC (permalink / raw)
To: Nick Craig-Wood; +Cc: David Wagner, linux-kernel
Nick Craig-Wood wrote:
> On Mon, Jan 19, 2009 at 11:19:34AM +0100, Stefan Richter wrote:
>> There is also /sys/module/*/parameters/* which can be read and in some
>> cases even be written.
>
> It doesn't appear to show the force parameter.
You are right.
>From drivers/ata/libata-core.c:
|> static char ata_force_param_buf[PAGE_SIZE] __initdata;
|> /* param_buf is thrown away after initialization, disallow read */
|> module_param_string(force, ata_force_param_buf,
sizeof(ata_force_param_buf), 0);
|> MODULE_PARM_DESC(force, "Force ATA configurations including cable
type, link speed and transfer mode (see
Documentation/kernel-parameters.txt for details)");
The 0 in module_param_string are the sysfs file permissions of libata.force.
And __initdata means that the memory goes away after ata_init() returned.
--
Stefan Richter
-=====-==--= ---= =--==
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-01-19 13:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-17 22:26 Checking module parameters David Wagner
2009-01-17 23:47 ` Alexey Dobriyan
2009-01-18 0:22 ` Robert Hancock
2009-01-18 15:59 ` Yanko Kaneti
2009-01-18 18:58 ` Alan Cox
[not found] <bVsVO-15X-19@gated-at.bofh.it>
2009-01-19 9:38 ` Nick Craig-Wood
2009-01-19 10:19 ` Stefan Richter
2009-01-19 12:44 ` Nick Craig-Wood
2009-01-19 13:06 ` Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox