diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2010-09-22 13:16:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-22 23:41:20 -0400 |
commit | a1ce647378c0262fe72757f989e961b2de6460a5 (patch) | |
tree | afd3e62996a49b32509297ff0f38831e6336f1c7 /drivers/net/e1000e/netdev.c | |
parent | 831bd2e6a6c09588fdde453ecb858f050ac1b942 (diff) |
e1000e: 82579 jumbo frame workaround causing CRC errors
The subject workaround was causing CRC errors due to writing the wrong
register with updates of the RCTL register. It was also found that the
workaround function which modifies the RCTL register was being called in
the middle of a read-modify-write operation of the RCTL register, so the
function call has been moved appropriately. Lastly, jumbo frames must not
be allowed when CRC stripping is disabled by a module parameter because the
workaround requires the CRC be stripped.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 29 |
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)) && |