netdev: bfin_mac: clear RXCKS if hardware generated checksum is not enabled
authorSonic Zhang <sonic.zhang@analog.com>
Mon, 10 May 2010 05:39:10 +0000 (05:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 May 2010 00:20:59 +0000 (17:20 -0700)
Otherwise we might be get a setting mismatch from a previous module or
bootloader and what the driver currently expects.

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.c

index 9e010d69f34a280857d00a32f599d2a4521b3f69..5d962b86ee2266e190014de8e080a1261f0b8cf1 100644 (file)
@@ -515,10 +515,11 @@ void setup_system_regs(struct net_device *dev)
         * Configure checksum support and rcve frame word alignment
         */
        sysctl = bfin_read_EMAC_SYSCTL();
+       sysctl |= RXDWA;
 #if defined(BFIN_MAC_CSUM_OFFLOAD)
-       sysctl |= RXDWA | RXCKS;
+       sysctl |= RXCKS;
 #else
-       sysctl |= RXDWA;
+       sysctl &= ~RXCKS;
 #endif
        bfin_write_EMAC_SYSCTL(sysctl);