Skip to content

Commit ea8179a

Browse files
bwallanJeff Kirsher
authored andcommitted
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 <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 86a80ea commit ea8179a

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

drivers/net/ethernet/intel/e1000e/ich8lan.c

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
142142
static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
143143
static s32 e1000_k1_workaround_lv(struct e1000_hw *hw);
144144
static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate);
145+
static s32 e1000_setup_copper_link_pch_lpt(struct e1000_hw *hw);
145146

146147
static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg)
147148
{
@@ -636,6 +637,8 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
636637
if (mac->type == e1000_pch_lpt) {
637638
mac->rar_entry_count = E1000_PCH_LPT_RAR_ENTRIES;
638639
mac->ops.rar_set = e1000_rar_set_pch_lpt;
640+
mac->ops.setup_physical_interface =
641+
e1000_setup_copper_link_pch_lpt;
639642
}
640643

641644
/* Enable PCS Lock-loss workaround for ICH8 */
@@ -3788,7 +3791,6 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw)
37883791
break;
37893792
case e1000_phy_82577:
37903793
case e1000_phy_82579:
3791-
case e1000_phy_i217:
37923794
ret_val = e1000_copper_link_setup_82577(hw);
37933795
if (ret_val)
37943796
return ret_val;
@@ -3823,6 +3825,31 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw)
38233825
return e1000e_setup_copper_link(hw);
38243826
}
38253827

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+
**/
3836+
static 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+
38263853
/**
38273854
* e1000_get_link_up_info_ich8lan - Get current link speed and duplex
38283855
* @hw: pointer to the HW structure

0 commit comments

Comments
 (0)