aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/intel/e1000e/ich8lan.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 4f2f0f69a48e..3b1c1a7e5dac 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -142,6 +142,7 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
142static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index); 142static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
143static s32 e1000_k1_workaround_lv(struct e1000_hw *hw); 143static s32 e1000_k1_workaround_lv(struct e1000_hw *hw);
144static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate); 144static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate);
145static s32 e1000_setup_copper_link_pch_lpt(struct e1000_hw *hw);
145 146
146static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) 147static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg)
147{ 148{
@@ -636,6 +637,8 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
636 if (mac->type == e1000_pch_lpt) { 637 if (mac->type == e1000_pch_lpt) {
637 mac->rar_entry_count = E1000_PCH_LPT_RAR_ENTRIES; 638 mac->rar_entry_count = E1000_PCH_LPT_RAR_ENTRIES;
638 mac->ops.rar_set = e1000_rar_set_pch_lpt; 639 mac->ops.rar_set = e1000_rar_set_pch_lpt;
640 mac->ops.setup_physical_interface =
641 e1000_setup_copper_link_pch_lpt;
639 } 642 }
640 643
641 /* Enable PCS Lock-loss workaround for ICH8 */ 644 /* Enable PCS Lock-loss workaround for ICH8 */
@@ -3788,7 +3791,6 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw)
3788 break; 3791 break;
3789 case e1000_phy_82577: 3792 case e1000_phy_82577:
3790 case e1000_phy_82579: 3793 case e1000_phy_82579:
3791 case e1000_phy_i217:
3792 ret_val = e1000_copper_link_setup_82577(hw); 3794 ret_val = e1000_copper_link_setup_82577(hw);
3793 if (ret_val) 3795 if (ret_val)
3794 return ret_val; 3796 return ret_val;
@@ -3824,6 +3826,31 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw)
3824} 3826}
3825 3827
3826/** 3828/**
3829 * e1000_setup_copper_link_pch_lpt - Configure MAC/PHY interface
3830 * @hw: pointer to the HW structure
3831 *
3832 * Calls the PHY specific link setup function and then calls the
3833 * generic setup_copper_link to finish configuring the link for
3834 * Lynxpoint PCH devices
3835 **/
3836static s32 e1000_setup_copper_link_pch_lpt(struct e1000_hw *hw)
3837{
3838 u32 ctrl;
3839 s32 ret_val;
3840
3841 ctrl = er32(CTRL);
3842 ctrl |= E1000_CTRL_SLU;
3843 ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX);
3844 ew32(CTRL, ctrl);
3845
3846 ret_val = e1000_copper_link_setup_82577(hw);
3847 if (ret_val)
3848 return ret_val;
3849
3850 return e1000e_setup_copper_link(hw);
3851}
3852
3853/**
3827 * e1000_get_link_up_info_ich8lan - Get current link speed and duplex 3854 * e1000_get_link_up_info_ich8lan - Get current link speed and duplex
3828 * @hw: pointer to the HW structure 3855 * @hw: pointer to the HW structure
3829 * @speed: pointer to store current link speed 3856 * @speed: pointer to store current link speed