Linux: passing parameters to kernel modules


 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Linux: passing parameters to kernel modules
# 1  
Old 02-24-2012
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:

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

Code:
# 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:
Code:
options qla2xxx ql2xmaxqdepth=16 ql2xloginretrycount=30 qlport_down_retry=14

# 2  
Old 05-15-2012
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.

Code:
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
This User Gave Thanks to otheus For This Post:
# 3  
Old 05-15-2012
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
This User Gave Thanks to bakunin For This Post:
# 4  
Old 05-16-2012
FYI: the code snippet above is the Qlogic driver for Linux 2.6.x. Version 8.01.07, copyrighted 2007.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Missing Modules After Compiling Kernel

I'm a little embarrassed after all these years I've never really successfully compiled my own kernel. I used this guide to make the following files: linux-headers-5.1.9_5.1.9-1_amd64.deb linux-image-5.1.9_5.1.9-1_amd64.deb linux-libc-dev_5.1.9-1_amd64.deb When I first booted into this... (4 Replies)
Discussion started by: Azrael
4 Replies

2. Linux

Disable loading kernel modules

Hi, I am running CentOS 6.5 and I want to remove auto loading 8021q and garp modules, but there are no configure files in /etc/modprobe.d define bot modules. I even added both module names to /etc/modprobe.d/blacklist.conf, both of them are still loaded after the reboot. How can I disable... (2 Replies)
Discussion started by: hce
2 Replies

3. Hardware

Linux Kernel Modules

Hey everyone. I have a question, doing an lsmod gives me a list of all the loaded modules for my system. But how did they know to load? my /etc/modules files is empty, so how did these modules know to load themselves on boot time? If I were to take this hard drive to another computer with a... (6 Replies)
Discussion started by: Lost in Cyberia
6 Replies

4. Red Hat

Kernel parameters problem in Linux

please tell me the list of kernel parameters in RHEL 5.7 Because we've a requirement in one project. Also tell me the importance of eah kernel parameter if possible. ==Thanks in Advance==:):D (1 Reply)
Discussion started by: vamshigvk475
1 Replies

5. UNIX for Dummies Questions & Answers

Linux kernel modules makefiles doubts

This query is regarding the makefiles of linux kernel modules. I saw at some sites on net it is suggesting to include the following path: KERNEL_SOURCE := /usr/src/linux... while at some places it is askibg to include /lib/modules path: KERNEL_SOURCE := /lib/modules/2.6.27-7-generic/build... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

6. Programming

Debugging Linux Kernel Modules

I am aware of debugging linux applications using gdb and ddd. Now I have written a simple kernel module having init_module, exit _module and some functions for tasklets and workqueues. I want to debug these kernel modules like I used to debug applications setting breakpoints etc. How can I debug... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

7. UNIX for Advanced & Expert Users

Kernel Modules Not geting built

I installed in VM the Mandriva Linux with 2.6.27 kernel. But presently when I fire make the modules .ko does not get built. I get the following output on firing command in the kernel module folder. $ make Building first_driver.c ... make: Entering directory... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

8. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

9. UNIX for Dummies Questions & Answers

Linux kernel module parameters

Hi, Does anyone know if it is possible to know the current value of a kernel module parameters after the module is loaded. Are the values of the parameters advertised at some /proc or /sys location ? The only thing I know is modinfo, that actually looks a the module .ko and gives a... (3 Replies)
Discussion started by: macL
3 Replies

10. HP-UX

Information about kernel modules

Hi all, what do kernel modules libaudit, klog and strlog do? Specifically I want to determine if it was possible for us to determine if kernel level auditing is enabled at all? regards (0 Replies)
Discussion started by: slash_blog
0 Replies
Login or Register to Ask a Question