aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2012-12-05 01:26:03 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-16 01:37:56 -0500
commit651fb1026d9c41d6073cffddfaef1aa224d4ea85 (patch)
tree89685951e10fb485268ddf5cd8b4a533025c67f7
parent4ddc48a9a5f3352343eb4725eb75f9ca38fa1559 (diff)
e1000e: 82577: workaround for link drop issue
When connected to certain switches, the 82577 PHY might drop link unexpectedly. Work around the issue by setting the Mean Square Error higher than the hardware default. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/e1000e/ich8lan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 8004d7113c39..a7d6c87ebc24 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -157,7 +157,8 @@
157#define I82579_EMI_ADDR 0x10 157#define I82579_EMI_ADDR 0x10
158#define I82579_EMI_DATA 0x11 158#define I82579_EMI_DATA 0x11
159#define I82579_LPI_UPDATE_TIMER 0x4805 /* in 40ns units + 40 ns base value */ 159#define I82579_LPI_UPDATE_TIMER 0x4805 /* in 40ns units + 40 ns base value */
160#define I82579_MSE_THRESHOLD 0x084F /* Mean Square Error Threshold */ 160#define I82579_MSE_THRESHOLD 0x084F /* 82579 Mean Square Error Threshold */
161#define I82577_MSE_THRESHOLD 0x0887 /* 82577 Mean Square Error Threshold */
161#define I82579_MSE_LINK_DOWN 0x2411 /* MSE count before dropping link */ 162#define I82579_MSE_LINK_DOWN 0x2411 /* MSE count before dropping link */
162#define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */ 163#define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */
163#define I217_EEE_LP_ABILITY 0x8002 /* IEEE MMD Register 7.61 */ 164#define I217_EEE_LP_ABILITY 0x8002 /* IEEE MMD Register 7.61 */
@@ -1809,6 +1810,11 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)
1809 if (ret_val) 1810 if (ret_val)
1810 goto release; 1811 goto release;
1811 ret_val = e1e_wphy_locked(hw, BM_PORT_GEN_CFG, phy_data & 0x00FF); 1812 ret_val = e1e_wphy_locked(hw, BM_PORT_GEN_CFG, phy_data & 0x00FF);
1813 if (ret_val)
1814 goto release;
1815
1816 /* set MSE higher to enable link to stay up when noise is high */
1817 ret_val = e1000_write_emi_reg_locked(hw, I82577_MSE_THRESHOLD, 0x0034);
1812release: 1818release:
1813 hw->phy.ops.release(hw); 1819 hw->phy.ops.release(hw);
1814 1820