* [PATCH][resend] Update e1000 to use module_param()
@ 2004-09-16 16:36 Roland Dreier
0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2004-09-16 16:36 UTC (permalink / raw)
To: cramerj, john.ronciak, ganesh.venkatesan; +Cc: jgarzik, netdev, linux-kernel
(resending because this seems to have been lost; e1000 still has mixed
MODULE_PARM and module_param use)
The change to e1000_main.c in
ChangeSet@1.1722.32.6, 2004-05-27 13:44:06-04:00, ganesh.venkatesan@intel.com
[PATCH] e1000 7/7: Support for ethtool msglevel based error
added module_param(debug, ...) to e1000_main.c. Since e1000_param.c
still uses MODULE_PARM(), this means that one gets
e1000: Ignoring new-style parameters in presence of obsolete ones
when e1000 is loaded, so the debug parameter cannot even be set.
The patch below fixes this by updating e1000_param.c to use
module_param() as well. Since module_param might make the parameters
visible in sysfs, I removed the __devinitdata notation from the
parameter arrays as well, just to be safe.
Thanks,
Roland
Signed-off-by: Roland Dreier <roland@topspin.com>
Index: linux-2.6.8.1/drivers/net/e1000/e1000_param.c
===================================================================
--- linux-2.6.8.1.orig/drivers/net/e1000/e1000_param.c 2004-08-14 03:55:48.000000000 -0700
+++ linux-2.6.8.1/drivers/net/e1000/e1000_param.c 2004-08-15 08:16:31.109671753 -0700
@@ -55,9 +55,11 @@
* over and over (plus this helps to avoid typo bugs).
*/
+static int param_count;
+
#define E1000_PARAM(X, S) \
-static const int __devinitdata X[E1000_MAX_NIC + 1] = E1000_PARAM_INIT; \
-MODULE_PARM(X, "1-" __MODULE_STRING(E1000_MAX_NIC) "i"); \
+static int X[E1000_MAX_NIC + 1] = E1000_PARAM_INIT; \
+module_param_array(X, int, param_count, 0); \
MODULE_PARM_DESC(X, S);
/* Transmit Descriptor Count
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH][resend] Update e1000 to use module_param()
@ 2004-09-17 10:05 Venkatesan, Ganesh
0 siblings, 0 replies; 2+ messages in thread
From: Venkatesan, Ganesh @ 2004-09-17 10:05 UTC (permalink / raw)
To: Roland Dreier, cramerj, Ronciak, John; +Cc: jgarzik, netdev, linux-kernel
Roland:
Thanks for the patch. Based on some feedback from the community we had
developed a patch several weeks ago. We just submitted the patch. Please
let me know if you see any issues with it.
Thanks,
Ganesh.
-----Original Message-----
From: Roland Dreier [mailto:roland@topspin.com]
Sent: Thursday, September 16, 2004 9:37 AM
To: cramerj; Ronciak, John; Venkatesan, Ganesh
Cc: jgarzik@pobox.com; netdev@oss.sgi.com; linux-kernel@vger.kernel.org
Subject: [PATCH][resend] Update e1000 to use module_param()
(resending because this seems to have been lost; e1000 still has mixed
MODULE_PARM and module_param use)
The change to e1000_main.c in
ChangeSet@1.1722.32.6, 2004-05-27 13:44:06-04:00,
ganesh.venkatesan@intel.com
[PATCH] e1000 7/7: Support for ethtool msglevel based error
added module_param(debug, ...) to e1000_main.c. Since e1000_param.c
still uses MODULE_PARM(), this means that one gets
e1000: Ignoring new-style parameters in presence of obsolete ones
when e1000 is loaded, so the debug parameter cannot even be set.
The patch below fixes this by updating e1000_param.c to use
module_param() as well. Since module_param might make the parameters
visible in sysfs, I removed the __devinitdata notation from the
parameter arrays as well, just to be safe.
Thanks,
Roland
Signed-off-by: Roland Dreier <roland@topspin.com>
Index: linux-2.6.8.1/drivers/net/e1000/e1000_param.c
===================================================================
--- linux-2.6.8.1.orig/drivers/net/e1000/e1000_param.c 2004-08-14
03:55:48.000000000 -0700
+++ linux-2.6.8.1/drivers/net/e1000/e1000_param.c 2004-08-15
08:16:31.109671753 -0700
@@ -55,9 +55,11 @@
* over and over (plus this helps to avoid typo bugs).
*/
+static int param_count;
+
#define E1000_PARAM(X, S) \
-static const int __devinitdata X[E1000_MAX_NIC + 1] = E1000_PARAM_INIT;
\
-MODULE_PARM(X, "1-" __MODULE_STRING(E1000_MAX_NIC) "i"); \
+static int X[E1000_MAX_NIC + 1] = E1000_PARAM_INIT; \
+module_param_array(X, int, param_count, 0); \
MODULE_PARM_DESC(X, S);
/* Transmit Descriptor Count
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-17 10:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16 16:36 [PATCH][resend] Update e1000 to use module_param() Roland Dreier
-- strict thread matches above, loose matches on Subject: below --
2004-09-17 10:05 Venkatesan, Ganesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).