aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/param.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2010-06-16 09:27:49 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-19 01:12:17 -0400
commite52997f96008fda655d7ec3aa4297d1272e8a385 (patch)
tree5ef658bdfd94b4e752113388d0deaf4c78d38aac /drivers/net/e1000e/param.c
parentd3738bb8203acf8552c3ec8b3447133fc0938ddd (diff)
e1000e: enable support for EEE on 82579
This patch enables IEEE802.3az (a.k.a. Energy Efficient Ethernet) on the new 82579 LOMs. An optional module parameter is provided to disable the feature if desired. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/param.c')
-rw-r--r--drivers/net/e1000e/param.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c
index a150e48a117f..a74846097afd 100644
--- a/drivers/net/e1000e/param.c
+++ b/drivers/net/e1000e/param.c
@@ -161,6 +161,15 @@ E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lea
161E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \ 161E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \
162 "the CRC"); 162 "the CRC");
163 163
164/*
165 * Enable/disable EEE (a.k.a. IEEE802.3az)
166 *
167 * Valid Range: 0, 1
168 *
169 * Default Value: 1
170 */
171E1000_PARAM(EEE, "Enable/disable on parts that support the feature");
172
164struct e1000_option { 173struct e1000_option {
165 enum { enable_option, range_option, list_option } type; 174 enum { enable_option, range_option, list_option } type;
166 const char *name; 175 const char *name;
@@ -477,4 +486,23 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
477 } 486 }
478 } 487 }
479 } 488 }
489 { /* EEE for parts supporting the feature */
490 static const struct e1000_option opt = {
491 .type = enable_option,
492 .name = "EEE Support",
493 .err = "defaulting to Enabled",
494 .def = OPTION_ENABLED
495 };
496
497 if (adapter->flags2 & FLAG2_HAS_EEE) {
498 /* Currently only supported on 82579 */
499 if (num_EEE > bd) {
500 unsigned int eee = EEE[bd];
501 e1000_validate_option(&eee, &opt, adapter);
502 hw->dev_spec.ich8lan.eee_disable = !eee;
503 } else {
504 hw->dev_spec.ich8lan.eee_disable = !opt.def;
505 }
506 }
507 }
480} 508}