* Hardcoding instead of using MAX_UNITS in 3c590.c driver
@ 2003-08-17 12:03 Peter Bieringer
0 siblings, 0 replies; only message in thread
From: Peter Bieringer @ 2003-08-17 12:03 UTC (permalink / raw)
To: Maillist netdev
Hi,
during looking for some "how-would-this-be-done" code, I wonder that driver
3c590.c doesn't always use MAX_UNITS. In difference, ne2.c does.
Perhaps fix below would helps. Possible, that such inconsistency also
exists in other drivers, too:
# diff -u 3c59x.c.orig 3c59x.c
--- 3c59x.c.orig Sun Aug 17 13:57:29 2003
+++ 3c59x.c Sun Aug 17 13:58:45 2003
@@ -269,12 +269,13 @@
DRV_VERSION " " DRV_RELDATE);
MODULE_LICENSE("GPL");
+#define MAX_UNITS 8
MODULE_PARM(debug, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(hw_checksums, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(flow_ctrl, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(enable_wol, "1-" __MODULE_STRING(8) "i");
+MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_PARM(hw_checksums, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_PARM(flow_ctrl, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_PARM(enable_wol, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM(rx_copybreak, "i");
MODULE_PARM(max_interrupt_work, "i");
MODULE_PARM(compaq_ioaddr, "i");
@@ -847,7 +848,6 @@
/* This driver uses 'options' to pass the media type, full-duplex flag,
etc. */
/* Option count limit only -- unlimited interfaces are supported. */
-#define MAX_UNITS 8
static int options[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1,};
static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
static int hw_checksums[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
BTW:
- static int options[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1,};
+ static int options[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1};
Peter
--
Dr. Peter Bieringer http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D mailto: pb at bieringer dot de
Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-08-17 12:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-17 12:03 Hardcoding instead of using MAX_UNITS in 3c590.c driver Peter Bieringer
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).