From: James Bottomley <James.Bottomley@SteelEye.com>
To: "Moore, Eric" <Eric.Moore@lsi.com>
Cc: "Prakash, Sathya" <Sathya.Prakash@lsi.com>, linux-scsi@vger.kernel.org
Subject: RE: [PATCH 0/5] mpt fusion: Add logging support
Date: Sat, 28 Jul 2007 13:40:21 -0400 [thread overview]
Message-ID: <1185644421.11492.32.camel@localhost.localdomain> (raw)
In-Reply-To: <1185575403.3434.24.camel@localhost.localdomain>
On Fri, 2007-07-27 at 18:30 -0400, James Bottomley wrote:
> On Fri, 2007-07-27 at 16:16 -0600, Moore, Eric wrote:
> > On Friday, July 27, 2007 10:21 AM, wrote:
> > >
> > > The way your module parameter works is slightly counter intuitive. On
> > > all our other drivers, you can write a value into
> > >
> > > /sys/module/<module>/parameters/<debug parameter>
> > >
> > > And have it acted on immediately. In yours, it seems only to work
> > > before the host is probed (because after that, the value in the ioc
> > > structure is what's used).
> >
> > not true, the debug parameter can be configured prior to the host being
> > probed.
>
> That's what I just said ... if you mean can be configured *after* the
> host being probed, then I think the parameter needs a
> module_param_call() so you can intercept the set and update the ioc
> structures accordingly.
I tell you what, let me just show you the actual patch. This allows you
to write to the /sys/module/mptbase/parameters/mpt_debug_level and have
it take effect in every ioc.
James
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...
*/
next prev parent reply other threads:[~2007-07-28 17:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-24 10:06 [PATCH 0/5] mpt fusion: Add logging support Prakash, Sathya
2007-07-26 16:37 ` Moore, Eric
2007-07-27 16:21 ` James Bottomley
2007-07-27 22:16 ` Moore, Eric
2007-07-27 22:30 ` James Bottomley
2007-07-28 17:40 ` James Bottomley [this message]
2007-07-30 18:33 ` Moore, Eric
2007-07-30 22:31 ` FUJITA Tomonori
2007-07-31 18:40 ` Moore, Eric
2007-08-01 21:57 ` FUJITA Tomonori
2007-07-28 4:14 ` Mr. James W. Laferriere
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1185644421.11492.32.camel@localhost.localdomain \
--to=james.bottomley@steeleye.com \
--cc=Eric.Moore@lsi.com \
--cc=Sathya.Prakash@lsi.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.