diff options
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/ich8lan.c')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 1cdec5fd2129..4f2f0f69a48e 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | |||
@@ -871,6 +871,34 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw) | |||
871 | return ret_val; | 871 | return ret_val; |
872 | } | 872 | } |
873 | 873 | ||
874 | /* When connected at 10Mbps half-duplex, 82579 parts are excessively | ||
875 | * aggressive resulting in many collisions. To avoid this, increase | ||
876 | * the IPG and reduce Rx latency in the PHY. | ||
877 | */ | ||
878 | if ((hw->mac.type == e1000_pch2lan) && link) { | ||
879 | u32 reg; | ||
880 | reg = er32(STATUS); | ||
881 | if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) { | ||
882 | reg = er32(TIPG); | ||
883 | reg &= ~E1000_TIPG_IPGT_MASK; | ||
884 | reg |= 0xFF; | ||
885 | ew32(TIPG, reg); | ||
886 | |||
887 | /* Reduce Rx latency in analog PHY */ | ||
888 | ret_val = hw->phy.ops.acquire(hw); | ||
889 | if (ret_val) | ||
890 | return ret_val; | ||
891 | |||
892 | ret_val = | ||
893 | e1000_write_emi_reg_locked(hw, I82579_RX_CONFIG, 0); | ||
894 | |||
895 | hw->phy.ops.release(hw); | ||
896 | |||
897 | if (ret_val) | ||
898 | return ret_val; | ||
899 | } | ||
900 | } | ||
901 | |||
874 | /* Work-around I218 hang issue */ | 902 | /* Work-around I218 hang issue */ |
875 | if ((hw->adapter->pdev->device == E1000_DEV_ID_PCH_LPTLP_I218_LM) || | 903 | if ((hw->adapter->pdev->device == E1000_DEV_ID_PCH_LPTLP_I218_LM) || |
876 | (hw->adapter->pdev->device == E1000_DEV_ID_PCH_LPTLP_I218_V)) { | 904 | (hw->adapter->pdev->device == E1000_DEV_ID_PCH_LPTLP_I218_V)) { |