Title: [4162] branches/2008R1/drivers/net/bfin_mac.c: [#3870] invalidate data cache of new_skb->data range when cache is WB
Revision
4162
Author
cooloney
Date
2008-01-29 03:19:27 -0600 (Tue, 29 Jan 2008)

Log Message

[#3870] invalidate data cache of new_skb->data range when cache is WB

It prevents overwritting new data from DMA.

Diffstat

 bfin_mac.c |    6 ++++++
 1 files changed, 6 insertions(+)

Modified Paths

Diff

Modified: branches/2008R1/drivers/net/bfin_mac.c (4161 => 4162)


--- branches/2008R1/drivers/net/bfin_mac.c	2008-01-29 08:43:24 UTC (rev 4161)
+++ branches/2008R1/drivers/net/bfin_mac.c	2008-01-29 09:19:27 UTC (rev 4162)
@@ -656,6 +656,12 @@
 	current_rx_ptr->skb = new_skb;
 	current_rx_ptr->desc_a.start_addr = (unsigned long)new_skb->data - 2;
 
+	/* Invidate the data cache of skb->data range when it is write back
+	 * cache. It will prevent overwritting the new data from DMA
+	 */
+	blackfin_dcache_invalidate_range((unsigned long)new_skb->head,
+					 (unsigned long)new_skb->end);
+
 	len = (unsigned short)((current_rx_ptr->status.status_word) & RX_FRLEN);
 	skb_put(skb, len);
 	blackfin_dcache_invalidate_range((unsigned long)skb->head,
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to