Commit bb436b20 authored by Bruce Allan's avatar Bruce Allan Committed by David S. Miller

e1000e: disable K1 on PCH LOM when in PHY loopback mode

When performing the ethtool PHY loopback test on PCH-based LOMs (82577 and
82578), disable K1 (a MAC-PHY interconnect low power mode) otherwise
packets might get corrupted.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 98086a95
...@@ -485,6 +485,7 @@ extern void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, ...@@ -485,6 +485,7 @@ extern void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
extern void e1000e_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw); extern void e1000e_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw);
extern void e1000e_gig_downshift_workaround_ich8lan(struct e1000_hw *hw); extern void e1000e_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
extern void e1000e_disable_gig_wol_ich8lan(struct e1000_hw *hw); extern void e1000e_disable_gig_wol_ich8lan(struct e1000_hw *hw);
extern s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
extern s32 e1000e_check_for_copper_link(struct e1000_hw *hw); extern s32 e1000e_check_for_copper_link(struct e1000_hw *hw);
extern s32 e1000e_check_for_fiber_link(struct e1000_hw *hw); extern s32 e1000e_check_for_fiber_link(struct e1000_hw *hw);
......
...@@ -1260,6 +1260,10 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter) ...@@ -1260,6 +1260,10 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
hw->mac.autoneg = 0; hw->mac.autoneg = 0;
/* Workaround: K1 must be disabled for stable 1Gbps operation */
if (hw->mac.type == e1000_pchlan)
e1000_configure_k1_ich8lan(hw, false);
if (hw->phy.type == e1000_phy_m88) { if (hw->phy.type == e1000_phy_m88) {
/* Auto-MDI/MDIX Off */ /* Auto-MDI/MDIX Off */
e1e_wphy(hw, M88E1000_PHY_SPEC_CTRL, 0x0808); e1e_wphy(hw, M88E1000_PHY_SPEC_CTRL, 0x0808);
......
...@@ -224,7 +224,6 @@ static s32 e1000_led_off_pchlan(struct e1000_hw *hw); ...@@ -224,7 +224,6 @@ static s32 e1000_led_off_pchlan(struct e1000_hw *hw);
static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active); static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active);
static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw); static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw);
static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link); static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link);
static s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg)
{ {
...@@ -1023,7 +1022,7 @@ static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link) ...@@ -1023,7 +1022,7 @@ static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link)
* *
* Success returns 0, Failure returns -E1000_ERR_PHY (-2) * Success returns 0, Failure returns -E1000_ERR_PHY (-2)
**/ **/
static s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable) s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable)
{ {
s32 ret_val = 0; s32 ret_val = 0;
u32 ctrl_reg = 0; u32 ctrl_reg = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment