From: Sonic Zhang Date: Mon, 10 Jan 2011 02:54:33 +0000 (+0000) Subject: netdev: bfin_mac: disable hardware checksum if writeback cache is enabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d70a3d42de642e1d78355338b63cf064dc0f345;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git netdev: bfin_mac: disable hardware checksum if writeback cache is enabled With writeback caches, corrupted RX packets will be sent up the stack without any error markings. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: David S. Miller --- diff --git a/drivers/net/bfin_mac.h b/drivers/net/bfin_mac.h index 4827f6b8238e..692187da99f0 100644 --- a/drivers/net/bfin_mac.h +++ b/drivers/net/bfin_mac.h @@ -17,7 +17,14 @@ #include #include +/* + * 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)