netdev: bfin_mac: disable hardware checksum if writeback cache is enabled
authorSonic Zhang <sonic.zhang@analog.com>
Mon, 10 Jan 2011 02:54:33 +0000 (02:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jan 2011 21:31:13 +0000 (13:31 -0800)
With writeback caches, corrupted RX packets will be sent up the stack
without any error markings.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bfin_mac.h

index 4827f6b..692187d 100644 (file)
 #include <linux/etherdevice.h>
 #include <linux/bfin_mac.h>
 
+/*
+ * Disable hardware checksum for bug #5600 if writeback cache is
+ * enabled. Otherwize, corrupted RX packet will be sent up stack
+ * without error mark.
+ */
+#ifndef CONFIG_BFIN_EXTMEM_WRITEBACK
 #define BFIN_MAC_CSUM_OFFLOAD
+#endif
 
 #define TX_RECLAIM_JIFFIES (HZ / 5)