aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/intel/e1000e/ich8lan.c15
-rw-r--r--drivers/net/ethernet/intel/e1000e/ich8lan.h1
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 9b736b8625ae..059f1b0112f4 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1314,14 +1314,17 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
1314 return ret_val; 1314 return ret_val;
1315 } 1315 }
1316 1316
1317 /* When connected at 10Mbps half-duplex, 82579 parts are excessively 1317 /* When connected at 10Mbps half-duplex, some parts are excessively
1318 * aggressive resulting in many collisions. To avoid this, increase 1318 * aggressive resulting in many collisions. To avoid this, increase
1319 * the IPG and reduce Rx latency in the PHY. 1319 * the IPG and reduce Rx latency in the PHY.
1320 */ 1320 */
1321 if ((hw->mac.type == e1000_pch2lan) && link) { 1321 if (((hw->mac.type == e1000_pch2lan) ||
1322 (hw->mac.type == e1000_pch_lpt)) && link) {
1322 u32 reg; 1323 u32 reg;
1323 reg = er32(STATUS); 1324 reg = er32(STATUS);
1324 if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) { 1325 if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) {
1326 u16 emi_addr;
1327
1325 reg = er32(TIPG); 1328 reg = er32(TIPG);
1326 reg &= ~E1000_TIPG_IPGT_MASK; 1329 reg &= ~E1000_TIPG_IPGT_MASK;
1327 reg |= 0xFF; 1330 reg |= 0xFF;
@@ -1332,8 +1335,12 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
1332 if (ret_val) 1335 if (ret_val)
1333 return ret_val; 1336 return ret_val;
1334 1337
1335 ret_val = 1338 if (hw->mac.type == e1000_pch2lan)
1336 e1000_write_emi_reg_locked(hw, I82579_RX_CONFIG, 0); 1339 emi_addr = I82579_RX_CONFIG;
1340 else
1341 emi_addr = I217_RX_CONFIG;
1342
1343 ret_val = e1000_write_emi_reg_locked(hw, emi_addr, 0);
1337 1344
1338 hw->phy.ops.release(hw); 1345 hw->phy.ops.release(hw);
1339 1346
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
index bead50f9187b..8fc6c15f31c8 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
@@ -242,6 +242,7 @@
242#define I217_EEE_CAPABILITY 0x8000 /* IEEE MMD Register 3.20 */ 242#define I217_EEE_CAPABILITY 0x8000 /* IEEE MMD Register 3.20 */
243#define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */ 243#define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */
244#define I217_EEE_LP_ABILITY 0x8002 /* IEEE MMD Register 7.61 */ 244#define I217_EEE_LP_ABILITY 0x8002 /* IEEE MMD Register 7.61 */
245#define I217_RX_CONFIG 0xB20C /* Receive configuration */
245 246
246#define E1000_EEE_RX_LPI_RCVD 0x0400 /* Tx LP idle received */ 247#define E1000_EEE_RX_LPI_RCVD 0x0400 /* Tx LP idle received */
247#define E1000_EEE_TX_LPI_RCVD 0x0800 /* Rx LP idle received */ 248#define E1000_EEE_TX_LPI_RCVD 0x0800 /* Rx LP idle received */