aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/ich8lan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/ich8lan.c')
-rw-r--r--drivers/net/e1000e/ich8lan.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 7530fc5d81c..9c389559892 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -217,6 +217,7 @@ static s32 e1000_cleanup_led_pchlan(struct e1000_hw *hw);
217static s32 e1000_led_on_pchlan(struct e1000_hw *hw); 217static s32 e1000_led_on_pchlan(struct e1000_hw *hw);
218static s32 e1000_led_off_pchlan(struct e1000_hw *hw); 218static s32 e1000_led_off_pchlan(struct e1000_hw *hw);
219static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active); 219static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active);
220static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw);
220static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw); 221static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw);
221static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link); 222static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link);
222 223
@@ -266,6 +267,8 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
266 phy->ops.set_d3_lplu_state = e1000_set_lplu_state_pchlan; 267 phy->ops.set_d3_lplu_state = e1000_set_lplu_state_pchlan;
267 phy->ops.write_reg = e1000_write_phy_reg_hv; 268 phy->ops.write_reg = e1000_write_phy_reg_hv;
268 phy->ops.write_reg_locked = e1000_write_phy_reg_hv_locked; 269 phy->ops.write_reg_locked = e1000_write_phy_reg_hv_locked;
270 phy->ops.power_up = e1000_power_up_phy_copper;
271 phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
269 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; 272 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
270 273
271 phy->id = e1000_phy_unknown; 274 phy->id = e1000_phy_unknown;
@@ -299,6 +302,9 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw)
299 phy->addr = 1; 302 phy->addr = 1;
300 phy->reset_delay_us = 100; 303 phy->reset_delay_us = 100;
301 304
305 phy->ops.power_up = e1000_power_up_phy_copper;
306 phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
307
302 /* 308 /*
303 * We may need to do this twice - once for IGP and if that fails, 309 * We may need to do this twice - once for IGP and if that fails,
304 * we'll set BM func pointers and try again 310 * we'll set BM func pointers and try again
@@ -3392,6 +3398,23 @@ static s32 e1000_get_cfg_done_ich8lan(struct e1000_hw *hw)
3392} 3398}
3393 3399
3394/** 3400/**
3401 * e1000_power_down_phy_copper_ich8lan - Remove link during PHY power down
3402 * @hw: pointer to the HW structure
3403 *
3404 * In the case of a PHY power down to save power, or to turn off link during a
3405 * driver unload, or wake on lan is not enabled, remove the link.
3406 **/
3407static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw)
3408{
3409 /* If the management interface is not enabled, then power down */
3410 if (!(hw->mac.ops.check_mng_mode(hw) ||
3411 hw->phy.ops.check_reset_block(hw)))
3412 e1000_power_down_phy_copper(hw);
3413
3414 return;
3415}
3416
3417/**
3395 * e1000_clear_hw_cntrs_ich8lan - Clear statistical counters 3418 * e1000_clear_hw_cntrs_ich8lan - Clear statistical counters
3396 * @hw: pointer to the HW structure 3419 * @hw: pointer to the HW structure
3397 * 3420 *