aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2013-03-06 04:02:47 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-03-28 02:55:22 -0400
commitea8179a72844b30d046cdcc932231872f2dbcc90 (patch)
tree09dd702fbfd015ae610bc67bd33cf516e6d33a09
parent86a80eab8ced2454bae954b681797c692afe2ea2 (diff)
e1000e: long access timeouts when I217/I218 MAC and PHY are out of sync
When the MAC and PHY are in two different modes (different power levels and interconnect speeds), it could take a long time before a PHY register access timed out using the existing MAC-PHY interconnect configuration coded into the driver for ICH- and PCH-based LOMs. Introduce an I217/I218- specific .setup_physical_interface operation which does not override the interconnect configuration in the NVM. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-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