This file needs some cleanups and reordering - logically order it
so that relevant defines and code are together with properly quoted
defaults.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
This commit is contained in:
Auke Kok 2006-11-01 08:48:07 -08:00 коммит произвёл Jeff Garzik
Родитель 6a042dab19
Коммит 04fedbfbc3
1 изменённых файлов: 20 добавлений и 58 удалений

Просмотреть файл

@ -44,16 +44,6 @@
*/ */
#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
/* Module Parameters are always initialized to -1, so that the driver
* can tell the difference between no user specified value or the
* user asking for the default value.
* The true default values are loaded in when e1000_check_options is called.
*
* This is a GCC extension to ANSI C.
* See the item "Labeled Elements in Initializers" in the section
* "Extensions to the C Language Family" of the GCC documentation.
*/
#define E1000_PARAM(X, desc) \ #define E1000_PARAM(X, desc) \
static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \
static int num_##X = 0; \ static int num_##X = 0; \
@ -67,7 +57,6 @@
* *
* Default Value: 256 * Default Value: 256
*/ */
E1000_PARAM(TxDescriptors, "Number of transmit descriptors"); E1000_PARAM(TxDescriptors, "Number of transmit descriptors");
/* Receive Descriptor Count /* Receive Descriptor Count
@ -77,7 +66,6 @@ E1000_PARAM(TxDescriptors, "Number of transmit descriptors");
* *
* Default Value: 256 * Default Value: 256
*/ */
E1000_PARAM(RxDescriptors, "Number of receive descriptors"); E1000_PARAM(RxDescriptors, "Number of receive descriptors");
/* User Specified Speed Override /* User Specified Speed Override
@ -90,7 +78,6 @@ E1000_PARAM(RxDescriptors, "Number of receive descriptors");
* *
* Default Value: 0 * Default Value: 0
*/ */
E1000_PARAM(Speed, "Speed setting"); E1000_PARAM(Speed, "Speed setting");
/* User Specified Duplex Override /* User Specified Duplex Override
@ -102,7 +89,6 @@ E1000_PARAM(Speed, "Speed setting");
* *
* Default Value: 0 * Default Value: 0
*/ */
E1000_PARAM(Duplex, "Duplex setting"); E1000_PARAM(Duplex, "Duplex setting");
/* Auto-negotiation Advertisement Override /* Auto-negotiation Advertisement Override
@ -119,8 +105,9 @@ E1000_PARAM(Duplex, "Duplex setting");
* *
* Default Value: 0x2F (copper); 0x20 (fiber) * Default Value: 0x2F (copper); 0x20 (fiber)
*/ */
E1000_PARAM(AutoNeg, "Advertised auto-negotiation setting"); E1000_PARAM(AutoNeg, "Advertised auto-negotiation setting");
#define AUTONEG_ADV_DEFAULT 0x2F
#define AUTONEG_ADV_MASK 0x2F
/* User Specified Flow Control Override /* User Specified Flow Control Override
* *
@ -132,8 +119,8 @@ E1000_PARAM(AutoNeg, "Advertised auto-negotiation setting");
* *
* Default Value: Read flow control settings from the EEPROM * Default Value: Read flow control settings from the EEPROM
*/ */
E1000_PARAM(FlowControl, "Flow Control setting"); E1000_PARAM(FlowControl, "Flow Control setting");
#define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL
/* XsumRX - Receive Checksum Offload Enable/Disable /* XsumRX - Receive Checksum Offload Enable/Disable
* *
@ -144,53 +131,54 @@ E1000_PARAM(FlowControl, "Flow Control setting");
* *
* Default Value: 1 * Default Value: 1
*/ */
E1000_PARAM(XsumRX, "Disable or enable Receive Checksum offload"); E1000_PARAM(XsumRX, "Disable or enable Receive Checksum offload");
/* Transmit Interrupt Delay in units of 1.024 microseconds /* Transmit Interrupt Delay in units of 1.024 microseconds
* Tx interrupt delay needs to typically be set to something non zero
* *
* Valid Range: 0-65535 * Valid Range: 0-65535
*
* Default Value: 64
*/ */
E1000_PARAM(TxIntDelay, "Transmit Interrupt Delay"); E1000_PARAM(TxIntDelay, "Transmit Interrupt Delay");
#define DEFAULT_TIDV 64
#define MAX_TXDELAY 0xFFFF
#define MIN_TXDELAY 0
/* Transmit Absolute Interrupt Delay in units of 1.024 microseconds /* Transmit Absolute Interrupt Delay in units of 1.024 microseconds
* *
* Valid Range: 0-65535 * Valid Range: 0-65535
*
* Default Value: 0
*/ */
E1000_PARAM(TxAbsIntDelay, "Transmit Absolute Interrupt Delay"); E1000_PARAM(TxAbsIntDelay, "Transmit Absolute Interrupt Delay");
#define DEFAULT_TADV 64
#define MAX_TXABSDELAY 0xFFFF
#define MIN_TXABSDELAY 0
/* Receive Interrupt Delay in units of 1.024 microseconds /* Receive Interrupt Delay in units of 1.024 microseconds
* hardware will likely hang if you set this to anything but zero.
* *
* Valid Range: 0-65535 * Valid Range: 0-65535
*
* Default Value: 0
*/ */
E1000_PARAM(RxIntDelay, "Receive Interrupt Delay"); E1000_PARAM(RxIntDelay, "Receive Interrupt Delay");
#define DEFAULT_RDTR 0
#define MAX_RXDELAY 0xFFFF
#define MIN_RXDELAY 0
/* Receive Absolute Interrupt Delay in units of 1.024 microseconds /* Receive Absolute Interrupt Delay in units of 1.024 microseconds
* *
* Valid Range: 0-65535 * Valid Range: 0-65535
*
* Default Value: 128
*/ */
E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay"); E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");
#define DEFAULT_RADV 128
#define MAX_RXABSDELAY 0xFFFF
#define MIN_RXABSDELAY 0
/* Interrupt Throttle Rate (interrupts/sec) /* Interrupt Throttle Rate (interrupts/sec)
* *
* Valid Range: 100-100000 (0=off, 1=dynamic) * Valid Range: 100-100000 (0=off, 1=dynamic)
*
* Default Value: 8000
*/ */
E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate"); E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
#define DEFAULT_ITR 8000
#define MAX_ITR 100000
#define MIN_ITR 100
/* Enable Smart Power Down of the PHY /* Enable Smart Power Down of the PHY
* *
@ -198,7 +186,6 @@ E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
* *
* Default Value: 0 (disabled) * Default Value: 0 (disabled)
*/ */
E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down"); E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");
/* Enable Kumeran Lock Loss workaround /* Enable Kumeran Lock Loss workaround
@ -207,33 +194,8 @@ E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");
* *
* Default Value: 1 (enabled) * Default Value: 1 (enabled)
*/ */
E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
#define AUTONEG_ADV_DEFAULT 0x2F
#define AUTONEG_ADV_MASK 0x2F
#define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL
#define DEFAULT_RDTR 0
#define MAX_RXDELAY 0xFFFF
#define MIN_RXDELAY 0
#define DEFAULT_RADV 128
#define MAX_RXABSDELAY 0xFFFF
#define MIN_RXABSDELAY 0
#define DEFAULT_TIDV 64
#define MAX_TXDELAY 0xFFFF
#define MIN_TXDELAY 0
#define DEFAULT_TADV 64
#define MAX_TXABSDELAY 0xFFFF
#define MIN_TXABSDELAY 0
#define DEFAULT_ITR 8000
#define MAX_ITR 100000
#define MIN_ITR 100
struct e1000_option { struct e1000_option {
enum { enable_option, range_option, list_option } type; enum { enable_option, range_option, list_option } type;
char *name; char *name;