Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=db47c2d8d98a76083a88ec53f44cc74c48dfd1e8
Commit:     db47c2d8d98a76083a88ec53f44cc74c48dfd1e8
Parent:     15617ff66c777b008e170f9c5b0e8a9854937648
Author:     James Bottomley <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 28 13:40:21 2007 -0400
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 10:42:18 2007 -0500

    [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" <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/message/fusion/mptbase.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index e866dac..414c109 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -88,7 +88,9 @@ module_param(mpt_channel_mapping, int, 0);
 MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)");
 
 static int mpt_debug_level;
-module_param(mpt_debug_level, int, 0);
+static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
+module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
+                 &mpt_debug_level, 0600);
 MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - 
(default=0)");
 
 #ifdef MFCNT
@@ -220,6 +222,19 @@ pci_enable_io_access(struct pci_dev *pdev)
        pci_write_config_word(pdev, PCI_COMMAND, command_reg);
 }
 
+static int mpt_set_debug_level(const char *val, struct kernel_param *kp)
+{
+       int ret = param_set_int(val, kp);
+       MPT_ADAPTER *ioc;
+
+       if (ret)
+               return ret;
+
+       list_for_each_entry(ioc, &ioc_list, list)
+               ioc->debug_level = mpt_debug_level;
+       return 0;
+}
+
 /*
  *  Process turbo (context) reply...
  */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to