diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000.h | 1 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 15 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_param.c | 25 |
3 files changed, 41 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 2b96ad0482ef..dbdaa332cac6 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
@@ -338,6 +338,7 @@ struct e1000_adapter { | |||
338 | #ifdef NETIF_F_TSO | 338 | #ifdef NETIF_F_TSO |
339 | boolean_t tso_force; | 339 | boolean_t tso_force; |
340 | #endif | 340 | #endif |
341 | boolean_t smart_power_down; /* phy smart power down */ | ||
341 | unsigned long flags; | 342 | unsigned long flags; |
342 | }; | 343 | }; |
343 | 344 | ||
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 76e36a4fd985..ea18f3085f69 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -607,6 +607,21 @@ e1000_reset(struct e1000_adapter *adapter) | |||
607 | 607 | ||
608 | e1000_reset_adaptive(&adapter->hw); | 608 | e1000_reset_adaptive(&adapter->hw); |
609 | e1000_phy_get_info(&adapter->hw, &adapter->phy_info); | 609 | e1000_phy_get_info(&adapter->hw, &adapter->phy_info); |
610 | |||
611 | if (!adapter->smart_power_down && | ||
612 | (adapter->hw.mac_type == e1000_82571 || | ||
613 | adapter->hw.mac_type == e1000_82572)) { | ||
614 | uint16_t phy_data = 0; | ||
615 | /* speed up time to link by disabling smart power down, ignore | ||
616 | * the return value of this function because there is nothing | ||
617 | * different we would do if it failed */ | ||
618 | e1000_read_phy_reg(&adapter->hw, IGP02E1000_PHY_POWER_MGMT, | ||
619 | &phy_data); | ||
620 | phy_data &= ~IGP02E1000_PM_SPD; | ||
621 | e1000_write_phy_reg(&adapter->hw, IGP02E1000_PHY_POWER_MGMT, | ||
622 | phy_data); | ||
623 | } | ||
624 | |||
610 | if (adapter->en_mng_pt) { | 625 | if (adapter->en_mng_pt) { |
611 | manc = E1000_READ_REG(&adapter->hw, MANC); | 626 | manc = E1000_READ_REG(&adapter->hw, MANC); |
612 | manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); | 627 | manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); |
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 | ||
184 | E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate"); | 184 | E1000_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 | |||
193 | E1000_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: |