Patchwork fix hang in dmfe driver on sending of big packet (linux-2.6.35)

login
register
mail settings
Submitter Alexander V. Lukyanov
Date Nov. 30, 2010, 1:46 p.m.
Message ID <20101130134626.GA1856@lw.yar.ru>
Download mbox | patch
Permalink /patch/73601/
State Superseded
Delegated to: David Miller
Headers show

Comments

Alexander V. Lukyanov - Nov. 30, 2010, 1:46 p.m.
Hello!

This patch fixes hang in dmfe driver on attempt of sending a big packet.
Without this patch the code stops the queue and never wakes it again.

Signed-off-by: Alexander V. Lukyanov <lav@netis.ru>

Patch

--- dmfe.c.1	2010-11-30 16:21:52.758465207 +0300
+++ dmfe.c	2010-11-30 16:24:45.301468601 +0300
@@ -687,18 +687,18 @@ 
 	unsigned long flags;
 
 	DMFE_DBUG(0, "dmfe_start_xmit", 0);
 
-	/* Resource flag check */
-	netif_stop_queue(dev);
-
 	/* Too large packet check */
 	if (skb->len > MAX_PACKET_SIZE) {
 		pr_err("big packet = %d\n", (u16)skb->len);
 		dev_kfree_skb(skb);
 		return NETDEV_TX_OK;
 	}
 
+	/* Resource flag check */
+	netif_stop_queue(dev);
+
 	spin_lock_irqsave(&db->lock, flags);
 
 	/* No Tx resource check, it never happen nromally */
 	if (db->tx_queue_cnt >= TX_FREE_DESC_CNT) {