aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.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_main.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_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c15
1 files changed, 15 insertions, 0 deletions
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);