aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_param.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2006-06-27 12:06:45 -0400
committerAuke Kok <juke-jan.h.kok@intel.com>2006-06-27 12:06:45 -0400
commit9a53a2029885e0088e9149679215b95d04deb57b (patch)
treee81f69cb79cc7f43332184b51c1213a14842dad9 /drivers/net/e1000/e1000_param.c
parent0cbabbb0725fa34a37d6b7870b2d2fe17d1a0a94 (diff)
e1000: add smart power down code
Smart Power Down is a power saving feature in newer e1000 hardware. We disable it because it causes time to link to be long, but make it a user choice. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers/net/e1000/e1000_param.c')
-rw-r--r--drivers/net/e1000/e1000_param.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c
index e55f8969a0fb..a8d9295b0779 100644
--- a/drivers/net/e1000/e1000_param.c
+++ b/drivers/net/e1000/e1000_param.c
@@ -183,6 +183,15 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");
183 183
184E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate"); 184E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
185 185
186/* Enable Smart Power Down of the PHY
187 *
188 * Valid Range: 0, 1
189 *
190 * Default Value: 0 (disabled)
191 */
192
193E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");
194
186#define AUTONEG_ADV_DEFAULT 0x2F 195#define AUTONEG_ADV_DEFAULT 0x2F
187#define AUTONEG_ADV_MASK 0x2F 196#define AUTONEG_ADV_MASK 0x2F
188#define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL 197#define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL
@@ -494,6 +503,22 @@ e1000_check_options(struct e1000_adapter *adapter)
494 adapter->itr = opt.def; 503 adapter->itr = opt.def;
495 } 504 }
496 } 505 }
506 { /* Smart Power Down */
507 struct e1000_option opt = {
508 .type = enable_option,
509 .name = "PHY Smart Power Down",
510 .err = "defaulting to Disabled",
511 .def = OPTION_DISABLED
512 };
513
514 if (num_SmartPowerDownEnable > bd) {
515 int spd = SmartPowerDownEnable[bd];
516 e1000_validate_option(&spd, &opt, adapter);
517 adapter->smart_power_down = spd;
518 } else {
519 adapter->smart_power_down = opt.def;
520 }
521 }
497 522
498 switch (adapter->hw.media_type) { 523 switch (adapter->hw.media_type) {
499 case e1000_media_type_fiber: 524 case e1000_media_type_fiber: