diff options
author | David Ertman <davidx.m.ertman@intel.com> | 2014-04-22 01:48:54 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-05-05 15:54:39 -0400 |
commit | fbb9ab10a289ff28b70f53af302d119401960a39 (patch) | |
tree | a9d989d318d76d529d9f5cfa06148090ce52a93b | |
parent | 77e61146c67765deae45faa7db088c64a9fbca00 (diff) |
e1000e: Expand workaround for 10Mb HD throughput bug
In commit 772d05c51c4f4896c120ad418b1e91144a2ac813 "e1000e: slow performance
between two 82579 connected via 10Mbit hub", a workaround was put into place
to address the overaggressive transmit behavior of 82579 parts when connecting
at 10Mbs half-duplex.
This same behavior is seen on i217 and i218 parts as well. This patch expands
the original workaround to encompass these parts.
Signed-off-by: Dave Ertman <davidx.m.ertman@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.c | 15 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.h | 1 |
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 */ |