e1000e: fix packet corruption and tx hang during NFSv2
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 5 Mar 2010 02:21:44 +0000 (02:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Mar 2010 22:00:18 +0000 (14:00 -0800)
when receiving a particular type of NFS v2 UDP traffic, the hardware could
DMA some bad data and then hang, possibly corrupting memory.

Disable the NFS parsing in this hardware, verified to fix the bug.

Originally reported and reproduced by RedHat's Neil Horman
CC: nhorman@tuxdriver.com
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e1000e/defines.h
drivers/net/e1000e/ich8lan.c

index db05ec35574931538e136e40db65988a43df45b4..e301e26d689770097f16d772ef7e4d17892b8b14 100644 (file)
 #define E1000_RXCSUM_IPPCSE    0x00001000   /* IP payload checksum enable */
 
 /* Header split receive */
+#define E1000_RFCTL_NFSW_DIS            0x00000040
+#define E1000_RFCTL_NFSR_DIS            0x00000080
 #define E1000_RFCTL_ACK_DIS             0x00001000
 #define E1000_RFCTL_EXTEN               0x00008000
 #define E1000_RFCTL_IPV6_EX_DIS         0x00010000
index 54d03a0ce3ce268e256d23e5f12e638777a91481..8b5e157e9c879e2cd0c7d4373ada56e31d0ce251 100644 (file)
@@ -2740,6 +2740,16 @@ static void e1000_initialize_hw_bits_ich8lan(struct e1000_hw *hw)
                reg &= ~(1 << 31);
                ew32(STATUS, reg);
        }
+
+       /*
+        * work-around descriptor data corruption issue during nfs v2 udp
+        * traffic, just disable the nfs filtering capability
+        */
+       reg = er32(RFCTL);
+       reg |= (E1000_RFCTL_NFSW_DIS | E1000_RFCTL_NFSR_DIS);
+       ew32(RFCTL, reg);
+
+       return;
 }
 
 /**