diff mbox

[5/9] netdev: bfin_mac: clear RXCKS if hardware generated checksum is not enabled

Message ID 1273505954-32588-5-git-send-email-vapier@gentoo.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Mike Frysinger May 10, 2010, 3:39 p.m. UTC
From: Sonic Zhang <sonic.zhang@analog.com>

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>
---
 drivers/net/bfin_mac.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Comments

David Miller May 18, 2010, 12:21 a.m. UTC | #1
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 10 May 2010 11:39:10 -0400

> From: Sonic Zhang <sonic.zhang@analog.com>
> 
> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index b57b5ac..bee5d7a 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);