aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/param.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-30 15:04:29 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-30 15:04:29 -0400
commit71d00feca2598c68186ca5b83247746d6a7fed7e (patch)
treefe129bfc6a69ea00a43ceffdd04ad91898a0411e /drivers/net/e1000e/param.c
parent8c1ee54cb3ff750dc39a5e1db8075e2352bbd1b8 (diff)
parent19abe86d60eeb34c5deeb3ab2d14229fa9f59157 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: ixgb: fix TX hangs under heavy load e1000e: Fix typo ! & ixgbe: minor sparse fixes e1000: sparse warnings fixes ixgb: fix sparse warnings e1000e: fix sparse warnings mv643xx_eth: Fix MV643XX_ETH offsets used by Pegasos 2 Blackfin EMAC driver: Fix Ethernet communication bug (dupliated and lost packets) DM9601: Support for ADMtek ADM8515 NIC
Diffstat (limited to 'drivers/net/e1000e/param.c')
-rw-r--r--drivers/net/e1000e/param.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c
index e4e655efb23c..332789238b9c 100644
--- a/drivers/net/e1000e/param.c
+++ b/drivers/net/e1000e/param.c
@@ -52,10 +52,11 @@ MODULE_PARM_DESC(copybreak,
52 */ 52 */
53 53
54#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } 54#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
55#define E1000_PARAM(X, desc) \ 55#define E1000_PARAM(X, desc) \
56 static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ 56 static int __devinitdata X[E1000_MAX_NIC+1] \
57 static int num_##X; \ 57 = E1000_PARAM_INIT; \
58 module_param_array_named(X, X, int, &num_##X, 0); \ 58 static unsigned int num_##X; \
59 module_param_array_named(X, X, int, &num_##X, 0); \
59 MODULE_PARM_DESC(X, desc); 60 MODULE_PARM_DESC(X, desc);
60 61
61 62
@@ -124,9 +125,9 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
124 125
125struct e1000_option { 126struct e1000_option {
126 enum { enable_option, range_option, list_option } type; 127 enum { enable_option, range_option, list_option } type;
127 char *name; 128 const char *name;
128 char *err; 129 const char *err;
129 int def; 130 int def;
130 union { 131 union {
131 struct { /* range_option info */ 132 struct { /* range_option info */
132 int min; 133 int min;
@@ -139,8 +140,8 @@ struct e1000_option {
139 } arg; 140 } arg;
140}; 141};
141 142
142static int __devinit e1000_validate_option(int *value, 143static int __devinit e1000_validate_option(unsigned int *value,
143 struct e1000_option *opt, 144 const struct e1000_option *opt,
144 struct e1000_adapter *adapter) 145 struct e1000_adapter *adapter)
145{ 146{
146 if (*value == OPTION_UNSET) { 147 if (*value == OPTION_UNSET) {
@@ -213,7 +214,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
213 } 214 }
214 215
215 { /* Transmit Interrupt Delay */ 216 { /* Transmit Interrupt Delay */
216 struct e1000_option opt = { 217 const struct e1000_option opt = {
217 .type = range_option, 218 .type = range_option,
218 .name = "Transmit Interrupt Delay", 219 .name = "Transmit Interrupt Delay",
219 .err = "using default of " 220 .err = "using default of "
@@ -232,7 +233,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
232 } 233 }
233 } 234 }
234 { /* Transmit Absolute Interrupt Delay */ 235 { /* Transmit Absolute Interrupt Delay */
235 struct e1000_option opt = { 236 const struct e1000_option opt = {
236 .type = range_option, 237 .type = range_option,
237 .name = "Transmit Absolute Interrupt Delay", 238 .name = "Transmit Absolute Interrupt Delay",
238 .err = "using default of " 239 .err = "using default of "
@@ -277,7 +278,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
277 } 278 }
278 } 279 }
279 { /* Receive Absolute Interrupt Delay */ 280 { /* Receive Absolute Interrupt Delay */
280 struct e1000_option opt = { 281 const struct e1000_option opt = {
281 .type = range_option, 282 .type = range_option,
282 .name = "Receive Absolute Interrupt Delay", 283 .name = "Receive Absolute Interrupt Delay",
283 .err = "using default of " 284 .err = "using default of "
@@ -296,7 +297,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
296 } 297 }
297 } 298 }
298 { /* Interrupt Throttling Rate */ 299 { /* Interrupt Throttling Rate */
299 struct e1000_option opt = { 300 const struct e1000_option opt = {
300 .type = range_option, 301 .type = range_option,
301 .name = "Interrupt Throttling Rate (ints/sec)", 302 .name = "Interrupt Throttling Rate (ints/sec)",
302 .err = "using default of " 303 .err = "using default of "
@@ -344,7 +345,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
344 } 345 }
345 } 346 }
346 { /* Smart Power Down */ 347 { /* Smart Power Down */
347 struct e1000_option opt = { 348 const struct e1000_option opt = {
348 .type = enable_option, 349 .type = enable_option,
349 .name = "PHY Smart Power Down", 350 .name = "PHY Smart Power Down",
350 .err = "defaulting to Disabled", 351 .err = "defaulting to Disabled",
@@ -352,7 +353,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
352 }; 353 };
353 354
354 if (num_SmartPowerDownEnable > bd) { 355 if (num_SmartPowerDownEnable > bd) {
355 int spd = SmartPowerDownEnable[bd]; 356 unsigned int spd = SmartPowerDownEnable[bd];
356 e1000_validate_option(&spd, &opt, adapter); 357 e1000_validate_option(&spd, &opt, adapter);
357 if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN) 358 if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN)
358 && spd) 359 && spd)
@@ -360,7 +361,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
360 } 361 }
361 } 362 }
362 { /* Kumeran Lock Loss Workaround */ 363 { /* Kumeran Lock Loss Workaround */
363 struct e1000_option opt = { 364 const struct e1000_option opt = {
364 .type = enable_option, 365 .type = enable_option,
365 .name = "Kumeran Lock Loss Workaround", 366 .name = "Kumeran Lock Loss Workaround",
366 .err = "defaulting to Enabled", 367 .err = "defaulting to Enabled",
@@ -368,7 +369,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
368 }; 369 };
369 370
370 if (num_KumeranLockLoss > bd) { 371 if (num_KumeranLockLoss > bd) {
371 int kmrn_lock_loss = KumeranLockLoss[bd]; 372 unsigned int kmrn_lock_loss = KumeranLockLoss[bd];
372 e1000_validate_option(&kmrn_lock_loss, &opt, adapter); 373 e1000_validate_option(&kmrn_lock_loss, &opt, adapter);
373 if (hw->mac.type == e1000_ich8lan) 374 if (hw->mac.type == e1000_ich8lan)
374 e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, 375 e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw,