aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r--drivers/net/e1000e/netdev.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 2b8ef44bd2b1..e561d15c3eb1 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2704,6 +2704,16 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
2704 u32 psrctl = 0; 2704 u32 psrctl = 0;
2705 u32 pages = 0; 2705 u32 pages = 0;
2706 2706
2707 /* Workaround Si errata on 82579 - configure jumbo frame flow */
2708 if (hw->mac.type == e1000_pch2lan) {
2709 s32 ret_val;
2710
2711 if (adapter->netdev->mtu > ETH_DATA_LEN)
2712 ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, true);
2713 else
2714 ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, false);
2715 }
2716
2707 /* Program MC offset vector base */ 2717 /* Program MC offset vector base */
2708 rctl = er32(RCTL); 2718 rctl = er32(RCTL);
2709 rctl &= ~(3 << E1000_RCTL_MO_SHIFT); 2719 rctl &= ~(3 << E1000_RCTL_MO_SHIFT);
@@ -2744,16 +2754,6 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
2744 e1e_wphy(hw, 22, phy_data); 2754 e1e_wphy(hw, 22, phy_data);
2745 } 2755 }
2746 2756
2747 /* Workaround Si errata on 82579 - configure jumbo frame flow */
2748 if (hw->mac.type == e1000_pch2lan) {
2749 s32 ret_val;
2750
2751 if (rctl & E1000_RCTL_LPE)
2752 ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, true);
2753 else
2754 ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, false);
2755 }
2756
2757 /* Setup buffer sizes */ 2757 /* Setup buffer sizes */
2758 rctl &= ~E1000_RCTL_SZ_4096; 2758 rctl &= ~E1000_RCTL_SZ_4096;
2759 rctl |= E1000_RCTL_BSEX; 2759 rctl |= E1000_RCTL_BSEX;
@@ -4833,6 +4833,15 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
4833 return -EINVAL; 4833 return -EINVAL;
4834 } 4834 }
4835 4835
4836 /* Jumbo frame workaround on 82579 requires CRC be stripped */
4837 if ((adapter->hw.mac.type == e1000_pch2lan) &&
4838 !(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
4839 (new_mtu > ETH_DATA_LEN)) {
4840 e_err("Jumbo Frames not supported on 82579 when CRC "
4841 "stripping is disabled.\n");
4842 return -EINVAL;
4843 }
4844
4836 /* 82573 Errata 17 */ 4845 /* 82573 Errata 17 */
4837 if (((adapter->hw.mac.type == e1000_82573) || 4846 if (((adapter->hw.mac.type == e1000_82573) ||
4838 (adapter->hw.mac.type == e1000_82574)) && 4847 (adapter->hw.mac.type == e1000_82574)) &&