Linux: passing parameters to kernel modules

Hi,

I need to set qlogic qla2xxx parameters in /etc/modprobe.conf
(Oracle Linux Server release 5.7, almost equal to RedHat 5.7)

two questions:
how can I pass this parameters to the module while it is loaded (fibre channel luns are in use), if possible at all

and how can I check the current used parameters by this module (modinfo shows me the possible values, but not the actual)

thanks in advance
cheers funksen

---------- Post updated at 14:28 ---------- Previous update was at 10:43 ----------

ok the second issue is solved I guess:

cd /sys/module/qla2xxx/parameters
# ls -l
total 0
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xallocfwdump
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xasynctmfenable
-rw-r--r-- 1 root root 4096 Feb 24 11:10 ql2xdbwr
-rw-r--r-- 1 root root 4096 Feb 24 11:10 ql2xdontresethba
-rw-r--r-- 1 root root 4096 Feb 24 11:10 ql2xenabledif
-rw-r--r-- 1 root root 4096 Feb 24 11:10 ql2xenablehba_err_chk
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xetsenable
-rw-r--r-- 1 root root 4096 Feb 24 11:10 ql2xextended_error_logging
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xfdmienable
-rw-r--r-- 1 root root 4096 Feb 24 11:10 ql2xfwloadbin
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xgffidenable
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xiidmaenable
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xloginretrycount
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xlogintimeout
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xmaxlun
-rw-r--r-- 1 root root 4096 Feb 24 11:10 ql2xmaxqdepth
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xmaxqueues
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xmdcapmask
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xmdenable
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xmultique_tag
-rw-r--r-- 1 root root 4096 Feb 24 11:10 ql2xplogiabsentdevice
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xshiftctondsd
-r--r--r-- 1 root root 4096 Feb 24 11:10 ql2xtargetreset
-r--r--r-- 1 root root 4096 Feb 24 11:10 qlport_down_retry

I set the parameter qlport_down_retry in /etc/modprobe.conf to 14

# cat qlport_down_retry
64

the whole system has been rebootet, but the new value is not being used by the module

in /etc/modprobe.conf:

options qla2xxx ql2xmaxqdepth=16 ql2xloginretrycount=30 qlport_down_retry=14

Indeed, I see the same problem on our system.

---------- Post updated at 01:56 PM ---------- Previous update was at 01:51 PM ----------

Ah, it's a read-only value in the driver source. This might be a bug.

int qlport_down_retry;
module_param(qlport_down_retry, int, S_IRUGO|S_IRUSR);
MODULE_PARM_DESC(qlport_down_retry,
                "Maximum number of command retries to a port that returns"
                "a PORT-DOWN status.");

If you could write to it, the S_IRUSR would be S_IWUSR.

See the final paragraph in the description of the macro here: 2.8. Module Parameters

1 Like

You might want to try the driver provided by QLogic instead of the open source kernel module. You can download it from the QLogic site. (Btw., you might want to get SANSurfer CLI and QConverge Console there too if you haven't done so already. These tools helped me a lot in my last project.)

I hope this helps.

bakunin

1 Like

FYI: the code snippet above is the Qlogic driver for Linux 2.6.x. Version 8.01.07, copyrighted 2007.