aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000e/param.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2012-11-28 04:28:37 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-12-01 06:37:22 -0500
commite921eb1ac411a32b98fa1a9ccbba1b24fae8de2d (patch)
tree9a3e5a63a4fec7eef24fd3e4929cf2b97ed1a9ed /drivers/net/ethernet/intel/e1000e/param.c
parentdaf56e406a94675d454f996cab56c3d0b0a0d8a6 (diff)
e1000e: cosmetic cleanup of comments
Update comments to conform to the preferred style for networking code as described in ./Documentation/CodingStyle and checked for in the recently added checkpatch NETWORKING_BLOCK_COMMENT_STYLE test. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/param.c')
-rw-r--r--drivers/net/ethernet/intel/e1000e/param.c50
1 files changed, 16 insertions, 34 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/param.c b/drivers/net/ethernet/intel/e1000e/param.c
index dfbfa7fd98c3..1fbb31554e4d 100644
--- a/drivers/net/ethernet/intel/e1000e/param.c
+++ b/drivers/net/ethernet/intel/e1000e/param.c
@@ -32,11 +32,9 @@
32 32
33#include "e1000.h" 33#include "e1000.h"
34 34
35/* 35/* This is the only thing that needs to be changed to adjust the
36 * This is the only thing that needs to be changed to adjust the
37 * maximum number of ports that the driver can manage. 36 * maximum number of ports that the driver can manage.
38 */ 37 */
39
40#define E1000_MAX_NIC 32 38#define E1000_MAX_NIC 32
41 39
42#define OPTION_UNSET -1 40#define OPTION_UNSET -1
@@ -49,12 +47,10 @@ module_param(copybreak, uint, 0644);
49MODULE_PARM_DESC(copybreak, 47MODULE_PARM_DESC(copybreak,
50 "Maximum size of packet that is copied to a new buffer on receive"); 48 "Maximum size of packet that is copied to a new buffer on receive");
51 49
52/* 50/* All parameters are treated the same, as an integer array of values.
53 * All parameters are treated the same, as an integer array of values.
54 * This macro just reduces the need to repeat the same declaration code 51 * This macro just reduces the need to repeat the same declaration code
55 * over and over (plus this helps to avoid typo bugs). 52 * over and over (plus this helps to avoid typo bugs).
56 */ 53 */
57
58#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } 54#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
59#define E1000_PARAM(X, desc) \ 55#define E1000_PARAM(X, desc) \
60 static int __devinitdata X[E1000_MAX_NIC+1] \ 56 static int __devinitdata X[E1000_MAX_NIC+1] \
@@ -63,8 +59,7 @@ MODULE_PARM_DESC(copybreak,
63 module_param_array_named(X, X, int, &num_##X, 0); \ 59 module_param_array_named(X, X, int, &num_##X, 0); \
64 MODULE_PARM_DESC(X, desc); 60 MODULE_PARM_DESC(X, desc);
65 61
66/* 62/* Transmit Interrupt Delay in units of 1.024 microseconds
67 * Transmit Interrupt Delay in units of 1.024 microseconds
68 * Tx interrupt delay needs to typically be set to something non-zero 63 * Tx interrupt delay needs to typically be set to something non-zero
69 * 64 *
70 * Valid Range: 0-65535 65 * Valid Range: 0-65535
@@ -74,8 +69,7 @@ E1000_PARAM(TxIntDelay, "Transmit Interrupt Delay");
74#define MAX_TXDELAY 0xFFFF 69#define MAX_TXDELAY 0xFFFF
75#define MIN_TXDELAY 0 70#define MIN_TXDELAY 0
76 71
77/* 72/* Transmit Absolute Interrupt Delay in units of 1.024 microseconds
78 * Transmit Absolute Interrupt Delay in units of 1.024 microseconds
79 * 73 *
80 * Valid Range: 0-65535 74 * Valid Range: 0-65535
81 */ 75 */
@@ -84,8 +78,7 @@ E1000_PARAM(TxAbsIntDelay, "Transmit Absolute Interrupt Delay");
84#define MAX_TXABSDELAY 0xFFFF 78#define MAX_TXABSDELAY 0xFFFF
85#define MIN_TXABSDELAY 0 79#define MIN_TXABSDELAY 0
86 80
87/* 81/* Receive Interrupt Delay in units of 1.024 microseconds
88 * Receive Interrupt Delay in units of 1.024 microseconds
89 * hardware will likely hang if you set this to anything but zero. 82 * hardware will likely hang if you set this to anything but zero.
90 * 83 *
91 * Valid Range: 0-65535 84 * Valid Range: 0-65535
@@ -94,8 +87,7 @@ E1000_PARAM(RxIntDelay, "Receive Interrupt Delay");
94#define MAX_RXDELAY 0xFFFF 87#define MAX_RXDELAY 0xFFFF
95#define MIN_RXDELAY 0 88#define MIN_RXDELAY 0
96 89
97/* 90/* Receive Absolute Interrupt Delay in units of 1.024 microseconds
98 * Receive Absolute Interrupt Delay in units of 1.024 microseconds
99 * 91 *
100 * Valid Range: 0-65535 92 * Valid Range: 0-65535
101 */ 93 */
@@ -103,8 +95,7 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");
103#define MAX_RXABSDELAY 0xFFFF 95#define MAX_RXABSDELAY 0xFFFF
104#define MIN_RXABSDELAY 0 96#define MIN_RXABSDELAY 0
105 97
106/* 98/* Interrupt Throttle Rate (interrupts/sec)
107 * Interrupt Throttle Rate (interrupts/sec)
108 * 99 *
109 * Valid Range: 100-100000 or one of: 0=off, 1=dynamic, 3=dynamic conservative 100 * Valid Range: 100-100000 or one of: 0=off, 1=dynamic, 3=dynamic conservative
110 */ 101 */
@@ -113,8 +104,7 @@ E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
113#define MAX_ITR 100000 104#define MAX_ITR 100000
114#define MIN_ITR 100 105#define MIN_ITR 100
115 106
116/* 107/* IntMode (Interrupt Mode)
117 * IntMode (Interrupt Mode)
118 * 108 *
119 * Valid Range: varies depending on kernel configuration & hardware support 109 * Valid Range: varies depending on kernel configuration & hardware support
120 * 110 *
@@ -132,8 +122,7 @@ E1000_PARAM(IntMode, "Interrupt Mode");
132#define MAX_INTMODE 2 122#define MAX_INTMODE 2
133#define MIN_INTMODE 0 123#define MIN_INTMODE 0
134 124
135/* 125/* Enable Smart Power Down of the PHY
136 * Enable Smart Power Down of the PHY
137 * 126 *
138 * Valid Range: 0, 1 127 * Valid Range: 0, 1
139 * 128 *
@@ -141,8 +130,7 @@ E1000_PARAM(IntMode, "Interrupt Mode");
141 */ 130 */
142E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down"); 131E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");
143 132
144/* 133/* Enable Kumeran Lock Loss workaround
145 * Enable Kumeran Lock Loss workaround
146 * 134 *
147 * Valid Range: 0, 1 135 * Valid Range: 0, 1
148 * 136 *
@@ -150,8 +138,7 @@ E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");
150 */ 138 */
151E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); 139E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
152 140
153/* 141/* Write Protect NVM
154 * Write Protect NVM
155 * 142 *
156 * Valid Range: 0, 1 143 * Valid Range: 0, 1
157 * 144 *
@@ -159,8 +146,7 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
159 */ 146 */
160E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]"); 147E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]");
161 148
162/* 149/* Enable CRC Stripping
163 * Enable CRC Stripping
164 * 150 *
165 * Valid Range: 0, 1 151 * Valid Range: 0, 1
166 * 152 *
@@ -351,8 +337,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
351 if (num_InterruptThrottleRate > bd) { 337 if (num_InterruptThrottleRate > bd) {
352 adapter->itr = InterruptThrottleRate[bd]; 338 adapter->itr = InterruptThrottleRate[bd];
353 339
354 /* 340 /* Make sure a message is printed for non-special
355 * Make sure a message is printed for non-special
356 * values. And in case of an invalid option, display 341 * values. And in case of an invalid option, display
357 * warning, use default and go through itr/itr_setting 342 * warning, use default and go through itr/itr_setting
358 * adjustment logic below 343 * adjustment logic below
@@ -361,14 +346,12 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
361 e1000_validate_option(&adapter->itr, &opt, adapter)) 346 e1000_validate_option(&adapter->itr, &opt, adapter))
362 adapter->itr = opt.def; 347 adapter->itr = opt.def;
363 } else { 348 } else {
364 /* 349 /* If no option specified, use default value and go
365 * If no option specified, use default value and go
366 * through the logic below to adjust itr/itr_setting 350 * through the logic below to adjust itr/itr_setting
367 */ 351 */
368 adapter->itr = opt.def; 352 adapter->itr = opt.def;
369 353
370 /* 354 /* Make sure a message is printed for non-special
371 * Make sure a message is printed for non-special
372 * default values 355 * default values
373 */ 356 */
374 if (adapter->itr > 4) 357 if (adapter->itr > 4)
@@ -400,8 +383,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
400 opt.name); 383 opt.name);
401 break; 384 break;
402 default: 385 default:
403 /* 386 /* Save the setting, because the dynamic bits
404 * Save the setting, because the dynamic bits
405 * change itr. 387 * change itr.
406 * 388 *
407 * Clear the lower two bits because 389 * Clear the lower two bits because