Title: [8905] trunk/drivers/net/bfin_mac.c: Task[#6035] clean up based on LKML feedback.
Revision
8905
Author
sonicz
Date
2010-06-11 05:56:51 -0400 (Fri, 11 Jun 2010)

Log Message

Task[#6035] clean up based on LKML feedback.

Free skb when reset tx queue.

Modified Paths

Diff

Modified: trunk/drivers/net/bfin_mac.c (8904 => 8905)


--- trunk/drivers/net/bfin_mac.c	2010-06-11 07:45:36 UTC (rev 8904)
+++ trunk/drivers/net/bfin_mac.c	2010-06-11 09:56:51 UTC (rev 8905)
@@ -1267,11 +1267,18 @@
 
 	bfin_mac_disable();
 
-	if (timer_pending(&lp->tx_reclaim_timer))
-		del_timer(&(lp->tx_reclaim_timer));
+	del_timer(&lp->tx_reclaim_timer);
 
 	/* reset tx queue */
-	current_tx_ptr = tx_list_head;
+	while (tx_list_head != current_tx_ptr) {
+		tx_list_head->desc_a.config &= ~DMAEN;
+		tx_list_head->status.status_word = 0;
+		if (tx_list_head->skb) {
+			dev_kfree_skb(tx_list_head->skb);
+			tx_list_head->skb = NULL;
+		}
+		tx_list_head = tx_list_head->next;
+	}
 
 	if (netif_queue_stopped(lp->ndev))
 		netif_wake_queue(lp->ndev);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to