Thread (41 messages) 41 messages, 5 authors, 2009-05-31
STALE6218d
Revisions (2)
  1. v1 current
  2. v1 [diff vs current]

[PATCH 2/5] netdev: bfin_mac: fix malformed UDP packet transmission when polling with KGDB

From: Mike Frysinger <hidden>
Date: 2009-05-27 06:10:17
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Sonic Zhang <redacted>

Make sure data is really written into the registers before enabling DMA.
Otherwise, the EMAC DMA controller may transfer out a malformed packet.
This patch may also fix netperf bugs or scp bugs.

Signed-off-by: Sonic Zhang <redacted>
Signed-off-by: Mike Frysinger <redacted>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 drivers/net/bfin_mac.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 1905532..626715c 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -688,6 +688,9 @@ static int bfin_mac_hard_start_xmit(struct sk_buff *skb,
 		}
 	}
 
+	/* Make sure data is really written into registers before enabling DMA */
+	SSYNC();
+
 	/* enable this packet's dma */
 	current_tx_ptr->desc_a.config |= DMAEN;
 
-- 
1.6.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help