aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/82571.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/82571.c')
-rw-r--r--drivers/net/e1000e/82571.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c
index 8ea3ed7e5364..26ea5d57a354 100644
--- a/drivers/net/e1000e/82571.c
+++ b/drivers/net/e1000e/82571.c
@@ -69,6 +69,7 @@ static void e1000_clear_vfta_82571(struct e1000_hw *hw);
69static bool e1000_check_mng_mode_82574(struct e1000_hw *hw); 69static bool e1000_check_mng_mode_82574(struct e1000_hw *hw);
70static s32 e1000_led_on_82574(struct e1000_hw *hw); 70static s32 e1000_led_on_82574(struct e1000_hw *hw);
71static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); 71static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw);
72static void e1000_power_down_phy_copper_82571(struct e1000_hw *hw);
72 73
73/** 74/**
74 * e1000_init_phy_params_82571 - Init PHY func ptrs. 75 * e1000_init_phy_params_82571 - Init PHY func ptrs.
@@ -88,6 +89,9 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
88 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; 89 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
89 phy->reset_delay_us = 100; 90 phy->reset_delay_us = 100;
90 91
92 phy->ops.power_up = e1000_power_up_phy_copper;
93 phy->ops.power_down = e1000_power_down_phy_copper_82571;
94
91 switch (hw->mac.type) { 95 switch (hw->mac.type) {
92 case e1000_82571: 96 case e1000_82571:
93 case e1000_82572: 97 case e1000_82572:
@@ -1601,6 +1605,28 @@ static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw)
1601} 1605}
1602 1606
1603/** 1607/**
1608 * e1000_power_down_phy_copper_82571 - Remove link during PHY power down
1609 * @hw: pointer to the HW structure
1610 *
1611 * In the case of a PHY power down to save power, or to turn off link during a
1612 * driver unload, or wake on lan is not enabled, remove the link.
1613 **/
1614static void e1000_power_down_phy_copper_82571(struct e1000_hw *hw)
1615{
1616 struct e1000_phy_info *phy = &hw->phy;
1617 struct e1000_mac_info *mac = &hw->mac;
1618
1619 if (!(phy->ops.check_reset_block))
1620 return;
1621
1622 /* If the management interface is not enabled, then power down */
1623 if (!(mac->ops.check_mng_mode(hw) || phy->ops.check_reset_block(hw)))
1624 e1000_power_down_phy_copper(hw);
1625
1626 return;
1627}
1628
1629/**
1604 * e1000_clear_hw_cntrs_82571 - Clear device specific hardware counters 1630 * e1000_clear_hw_cntrs_82571 - Clear device specific hardware counters
1605 * @hw: pointer to the HW structure 1631 * @hw: pointer to the HW structure
1606 * 1632 *