summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSonic Zhang2010-05-10 07:39:10 +0200
committerDavid S. Miller2010-05-18 02:20:59 +0200
commit812a9de71512e5da6f3177f7249a2448b6a4322e (patch)
tree79977876a33fe917f59561a2cd2cdf770e53fa9f /drivers
parentnetdev: bfin_mac: deduce Ethernet FCS from hardware IP payload checksum (diff)
downloadkernel-qcow2-linux-812a9de71512e5da6f3177f7249a2448b6a4322e.tar.gz
kernel-qcow2-linux-812a9de71512e5da6f3177f7249a2448b6a4322e.tar.xz
kernel-qcow2-linux-812a9de71512e5da6f3177f7249a2448b6a4322e.zip
netdev: bfin_mac: clear RXCKS if hardware generated checksum is not enabled
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bfin_mac.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 9e010d69f34a..5d962b86ee22 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -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);