[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0F1B54C89D5F954D8535DB252AF412FA041F17F9@chinexm1.ad.analog.com>
Date: Sun, 31 May 2009 10:57:49 +0800
From: "Zhang, Sonic" <Sonic.Zhang@...log.com>
To: "Mike Frysinger" <vapier@...too.org>, <netdev@...r.kernel.org>
CC: <uclinux-dist-devel@...ckfin.uclinux.org>,
"Bryan Wu" <cooloney@...nel.org>
Subject: RE: [PATCH 2/4 v2] netdev: bfin_mac: fix malformed UDP packet transmission when polling with KGDB
OK. Mike's explanation is correct.
Sonic
-----Original Message-----
From: Mike Frysinger [mailto:vapier@...too.org]
Sent: Friday, May 29, 2009 9:41 PM
To: netdev@...r.kernel.org
Cc: uclinux-dist-devel@...ckfin.uclinux.org; Zhang, Sonic; Bryan Wu
Subject: [PATCH 2/4 v2] netdev: bfin_mac: fix malformed UDP packet
transmission when polling with KGDB
From: Sonic Zhang <sonic.zhang@...log.com>
Writes to the DMA descriptors may sit in the internal Blackfin data
buffers and not actually be available when the DMA engine goes to fetch
them. This does not typically happen, but when dealing with short/fast
packets such as UDP and polling KGDB, this occurs much more frequently.
Same goes for heavy loads as seen by netperf tests or large scp
transfers. So force the buffers to drain with SSYNC otherwise we get
random malformed packets.
Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
Signed-off-by: Mike Frysinger <vapier@...too.org>
Signed-off-by: Bryan Wu <cooloney@...nel.org>
---
v2
- make comment/changelog reflect what is actually going on
drivers/net/bfin_mac.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index
1905532..38d34ce 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -688,6 +688,12 @@ static int bfin_mac_hard_start_xmit(struct sk_buff
*skb,
}
}
+ /* make sure the internal data buffers in the core are drained
+ * so that the DMA descriptors are completely written when the
+ * DMA engine goes to fetch them below
+ */
+ SSYNC();
+
/* enable this packet's dma */
current_tx_ptr->desc_a.config |= DMAEN;
--
1.6.3.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists