Checking module parameters
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · David Wagner
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/localcontaining:
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?
Quoted 5 lines
(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
Signature · 1 line
Nick Craig-Wood <[email protected]> -- http://www.craig-wood.com/nick
Quoted 5 lines · Nick Craig-Wood
Quoted 4 lines · David Wagner
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,
...
Quoted 7 lines
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.
Signature · 3 lines
Stefan Richter -=====-==--= ---= =--== http://arcgraph.de/sr/
Quoted 10 lines · Stefan Richter
Quoted 5 lines · Nick Craig-Wood
Quoted 4 lines · David Wagner
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,
...
Quoted 3 lines
I had to do this recently (under debian I ended up putting "libata force=1.5Gbps" into
/etc/modules)
Quoted 7 lines
Quoted 4 lines
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 218There 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
Signature · 1 line
Nick Craig-Wood <[email protected]> -- http://www.craig-wood.com/nick
Quoted 5 lines · Nick Craig-Wood
Quoted 2 lines · Stefan Richter
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.
Quoted 1 line
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.
Signature · 3 lines
Stefan Richter -=====-==--= ---= =--== http://arcgraph.de/sr/