Skip to content

Commit 77e6114

Browse files
David ErtmanJeff Kirsher
David Ertman
authored and
Jeff Kirsher
committed
e1000e: Workaround for dropped packets in Gig/100 speeds on 82579
This is a workaround for a HW erratum on 82579 devices. Erratum is #23 in Intel 6 Series Chipset and Intel C200 Series Chipset specification Update June 2013. Problem: 82579 parts experience packet loss in Gig and 100 speeds when interconnect between PHY and MAC is exiting K1 power saving state. This was previously believed to only affect 1Gig speed, but has been observed at 100Mbs also. Workaround: Disable K1 for 82579 devices at Gig and 100 speeds. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 9d4619c commit 77e6114

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

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

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2493,51 +2493,44 @@ static s32 e1000_lv_phy_workarounds_ich8lan(struct e1000_hw *hw)
24932493
* e1000_k1_gig_workaround_lv - K1 Si workaround
24942494
* @hw: pointer to the HW structure
24952495
*
2496-
* Workaround to set the K1 beacon duration for 82579 parts
2496+
* Workaround to set the K1 beacon duration for 82579 parts in 10Mbps
2497+
* Disable K1 in 1000Mbps and 100Mbps
24972498
**/
24982499
static s32 e1000_k1_workaround_lv(struct e1000_hw *hw)
24992500
{
25002501
s32 ret_val = 0;
25012502
u16 status_reg = 0;
2502-
u32 mac_reg;
2503-
u16 phy_reg;
25042503

25052504
if (hw->mac.type != e1000_pch2lan)
25062505
return 0;
25072506

2508-
/* Set K1 beacon duration based on 1Gbps speed or otherwise */
2507+
/* Set K1 beacon duration based on 10Mbs speed */
25092508
ret_val = e1e_rphy(hw, HV_M_STATUS, &status_reg);
25102509
if (ret_val)
25112510
return ret_val;
25122511

25132512
if ((status_reg & (HV_M_STATUS_LINK_UP | HV_M_STATUS_AUTONEG_COMPLETE))
25142513
== (HV_M_STATUS_LINK_UP | HV_M_STATUS_AUTONEG_COMPLETE)) {
2515-
mac_reg = er32(FEXTNVM4);
2516-
mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
2517-
2518-
ret_val = e1e_rphy(hw, I82579_LPI_CTRL, &phy_reg);
2519-
if (ret_val)
2520-
return ret_val;
2521-
2522-
if (status_reg & HV_M_STATUS_SPEED_1000) {
2514+
if (status_reg &
2515+
(HV_M_STATUS_SPEED_1000 | HV_M_STATUS_SPEED_100)) {
25232516
u16 pm_phy_reg;
25242517

2525-
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC;
2526-
phy_reg &= ~I82579_LPI_CTRL_FORCE_PLL_LOCK_COUNT;
2527-
/* LV 1G Packet drop issue wa */
2518+
/* LV 1G/100 Packet drop issue wa */
25282519
ret_val = e1e_rphy(hw, HV_PM_CTRL, &pm_phy_reg);
25292520
if (ret_val)
25302521
return ret_val;
2531-
pm_phy_reg &= ~HV_PM_CTRL_PLL_STOP_IN_K1_GIGA;
2522+
pm_phy_reg &= ~HV_PM_CTRL_K1_ENABLE;
25322523
ret_val = e1e_wphy(hw, HV_PM_CTRL, pm_phy_reg);
25332524
if (ret_val)
25342525
return ret_val;
25352526
} else {
2527+
u32 mac_reg;
2528+
2529+
mac_reg = er32(FEXTNVM4);
2530+
mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
25362531
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_16USEC;
2537-
phy_reg |= I82579_LPI_CTRL_FORCE_PLL_LOCK_COUNT;
2532+
ew32(FEXTNVM4, mac_reg);
25382533
}
2539-
ew32(FEXTNVM4, mac_reg);
2540-
ret_val = e1e_wphy(hw, I82579_LPI_CTRL, phy_reg);
25412534
}
25422535

25432536
return ret_val;

drivers/net/ethernet/intel/e1000e/phy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ s32 e1000_get_cable_length_82577(struct e1000_hw *hw);
164164
#define HV_M_STATUS_AUTONEG_COMPLETE 0x1000
165165
#define HV_M_STATUS_SPEED_MASK 0x0300
166166
#define HV_M_STATUS_SPEED_1000 0x0200
167+
#define HV_M_STATUS_SPEED_100 0x0100
167168
#define HV_M_STATUS_LINK_UP 0x0040
168169

169170
#define IGP01E1000_PHY_PCS_INIT_REG 0x00B4

0 commit comments

Comments
 (0)