Title: [7700] branches/2009R1/drivers/net/bfin_mac.c: Avoid tx skb overflows the tx DMA ring.
Revision
7700
Author
sonicz
Date
2009-10-22 05:41:09 -0400 (Thu, 22 Oct 2009)

Log Message

Avoid tx skb overflows the tx DMA ring.

Modified Paths


Diff

Modified: branches/2009R1/drivers/net/bfin_mac.c (7699 => 7700)


--- branches/2009R1/drivers/net/bfin_mac.c	2009-10-22 09:39:52 UTC (rev 7699)
+++ branches/2009R1/drivers/net/bfin_mac.c	2009-10-22 09:41:09 UTC (rev 7700)
@@ -624,6 +624,10 @@
 {
 	u16 *data;
 	u32 data_align = (u32)(skb->data) & 0x3;
+
+	if (current_tx_ptr->next == tx_list_head)
+		return NETDEV_TX_BUSY;
+
 	current_tx_ptr->skb = skb;
 
 	if (data_align == 0x2) {
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to