e1000e: Driver workaround for IPv6 Header Extension Erratum.
authorMatthew Vick <matthew.vick@intel.com>
Wed, 25 Apr 2012 08:01:05 +0000 (08:01 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 3 May 2012 09:29:04 +0000 (02:29 -0700)
Previously, IPv6 extension header parsing was disabled for all devices
supported by e1000e when using packet split mode. However, as per a
silicon errata, only certain devices need this restriction and will need
to disable IPv6 extension header parsing for all modes.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/80003es2lan.c
drivers/net/ethernet/intel/e1000e/82571.c
drivers/net/ethernet/intel/e1000e/ich8lan.c
drivers/net/ethernet/intel/e1000e/netdev.c

index 66f9877bc4ec5df8a0380205bc639ee8dd3a4c60..4dd18a1f45d27b7fd95ba6d486f509a7bce24a4d 100644 (file)
@@ -944,6 +944,14 @@ static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw)
        else
                reg |= (1 << 28);
        ew32(TARC(1), reg);
+
+       /*
+        * Disable IPv6 extension header parsing because some malformed
+        * IPv6 headers can hang the Rx.
+        */
+       reg = er32(RFCTL);
+       reg |= (E1000_RFCTL_IPV6_EX_DIS | E1000_RFCTL_NEW_IPV6_EXT_DIS);
+       ew32(RFCTL, reg);
 }
 
 /**
index 7b02e87b0b65bf3831db31d3e77aa511d657e002..98632f4561b26de4da8db8acd5b3f36cab70f53a 100644 (file)
@@ -1279,6 +1279,16 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
                ew32(CTRL_EXT, reg);
        }
 
+       /*
+        * Disable IPv6 extension header parsing because some malformed
+        * IPv6 headers can hang the Rx.
+        */
+       if (hw->mac.type <= e1000_82573) {
+               reg = er32(RFCTL);
+               reg |= (E1000_RFCTL_IPV6_EX_DIS | E1000_RFCTL_NEW_IPV6_EXT_DIS);
+               ew32(RFCTL, reg);
+       }
+
        /* PCI-Ex Control Registers */
        switch (hw->mac.type) {
        case e1000_82574:
index c58ed26d85af4e10584bd5ac7da34dff1a53555d..dfff4416cf4b933446ccfb3d5bdbb5036da39b2a 100644 (file)
@@ -3468,6 +3468,13 @@ static void e1000_initialize_hw_bits_ich8lan(struct e1000_hw *hw)
         */
        reg = er32(RFCTL);
        reg |= (E1000_RFCTL_NFSW_DIS | E1000_RFCTL_NFSR_DIS);
+
+       /*
+        * Disable IPv6 extension header parsing because some malformed
+        * IPv6 headers can hang the Rx.
+        */
+       if (hw->mac.type == e1000_ich8lan)
+               reg |= (E1000_RFCTL_IPV6_EX_DIS | E1000_RFCTL_NEW_IPV6_EXT_DIS);
        ew32(RFCTL, reg);
 }
 
index e86b524a5b156e7726a4fd4ea2c888e18fa78d63..ab4505c99e672b59b09a2414e773a7f99a230112 100644 (file)
@@ -2939,6 +2939,7 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
        /* Enable Extended Status in all Receive Descriptors */
        rfctl = er32(RFCTL);
        rfctl |= E1000_RFCTL_EXTEN;
+       ew32(RFCTL, rfctl);
 
        /*
         * 82571 and greater support packet-split where the protocol
@@ -2964,13 +2965,6 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
        if (adapter->rx_ps_pages) {
                u32 psrctl = 0;
 
-               /*
-                * disable packet split support for IPv6 extension headers,
-                * because some malformed IPv6 headers can hang the Rx
-                */
-               rfctl |= (E1000_RFCTL_IPV6_EX_DIS |
-                         E1000_RFCTL_NEW_IPV6_EXT_DIS);
-
                /* Enable Packet split descriptors */
                rctl |= E1000_RCTL_DTYP_PS;
 
@@ -3009,7 +3003,6 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
                 */
        }
 
-       ew32(RFCTL, rfctl);
        ew32(RCTL, rctl);
        /* just started the receive unit, no need to restart */
        adapter->flags &= ~FLAG_RX_RESTART_NOW;