Title: [6507] trunk/drivers/net/bfin_mac.c: Fix bug[#4836] Make sure data are really written into DMA NEXT_DESC_PTR
- Revision
- 6507
- Author
- sonicz
- Date
- 2009-05-30 21:52:39 -0500 (Sat, 30 May 2009)
Log Message
Fix bug[#4836] Make sure data are really written into DMA NEXT_DESC_PTR
retister before enabling the DMA Controller.
Otherwise, the EMAC dma controller may transfer out malformed packet.
This patch may also fix netperf bugs or scp bugs.
Modified Paths
Diff
Modified: trunk/drivers/net/bfin_mac.c (6506 => 6507)
--- trunk/drivers/net/bfin_mac.c 2009-05-30 22:19:31 UTC (rev 6506)
+++ trunk/drivers/net/bfin_mac.c 2009-05-31 02:52:39 UTC (rev 6507)
@@ -641,9 +641,6 @@
(u32)(current_tx_ptr->packet + skb->len + 2));
}
- /* Make sure data is really written into registers before enabling DMA */
- SSYNC();
-
/* enable this packet's dma */
current_tx_ptr->desc_a.config |= DMAEN;
@@ -653,6 +650,10 @@
/* tx dma is not running */
bfin_write_DMA2_NEXT_DESC_PTR(&(current_tx_ptr->desc_a));
+ /* Make sure data is really written into DMA NEXT_DESC_PTR register
+ * before enableing the DMA controller.
+ */
+ SSYNC();
/* dma enabled, read from memory, size is 6 */
bfin_write_DMA2_CONFIG(current_tx_ptr->desc_a.config);
/* Turn on the EMAC tx */
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits