aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2007-07-28 13:40:21 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-31 11:42:18 -0400
commitdb47c2d8d98a76083a88ec53f44cc74c48dfd1e8 (patch)
tree3fbbbde29674cee71d6061441d854e5aa661fade /drivers/message/fusion
parent15617ff66c777b008e170f9c5b0e8a9854937648 (diff)
[SCSI] mpt fusion: make logging a global sysfs parameter
Wire up the mpt_debug_level module parameter so you can write to the /sys/module/mptbase/parameters/mpt_debug_level and have it take effect in every ioc. Acked-by: "Moore, Eric" <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r--drivers/message/fusion/mptbase.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index e866dacde7e5..414c109f4cf5 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -88,7 +88,9 @@ module_param(mpt_channel_mapping, int, 0);
88MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)"); 88MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)");
89 89
90static int mpt_debug_level; 90static int mpt_debug_level;
91module_param(mpt_debug_level, int, 0); 91static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
92module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
93 &mpt_debug_level, 0600);
92MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - (default=0)"); 94MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - (default=0)");
93 95
94#ifdef MFCNT 96#ifdef MFCNT
@@ -220,6 +222,19 @@ pci_enable_io_access(struct pci_dev *pdev)
220 pci_write_config_word(pdev, PCI_COMMAND, command_reg); 222 pci_write_config_word(pdev, PCI_COMMAND, command_reg);
221} 223}
222 224
225static int mpt_set_debug_level(const char *val, struct kernel_param *kp)
226{
227 int ret = param_set_int(val, kp);
228 MPT_ADAPTER *ioc;
229
230 if (ret)
231 return ret;
232
233 list_for_each_entry(ioc, &ioc_list, list)
234 ioc->debug_level = mpt_debug_level;
235 return 0;
236}
237
223/* 238/*
224 * Process turbo (context) reply... 239 * Process turbo (context) reply...
225 */ 240 */