fix hang in dmfe driver on sending of big packet (linux-2.6.35)
Subsystems (2)
PATCH 1/1 fix hang in dmfe driver on sending of big packet (linux-2.6.35)
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.
Signature · 1 line
Alexander.
dmfe.c renamed from dmfe.c.1 +3 -3
@@ -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 ) {
From: Alexander V. Lukyanov <[email protected]>
Quoted 7 lines · Alexander V. Lukyanov
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 <[email protected]>
Nice catch, but your patch is not a "diff -p1" one
I did it for net-2.6 tree :
Thanks
[PATCH] tulip: fix hang in dmfe driver on sending of big packet
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.
--- drivers/net/tulip/dmfe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/tulip/dmfe.c +3 -3
@@ -688,9 +688,6 @@ static netdev_tx_t dmfe_start_xmit(struct sk_buff *skb,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);
@@ -698,6 +695,9 @@ static netdev_tx_t dmfe_start_xmit(struct sk_buff *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 */
From: Eric Dumazet <[email protected]>
Date: Tue, 30 Nov 2010 14:57:39 +0100
Quoted 17 lines
From: Alexander V. Lukyanov <[email protected]>
Quoted 7 lines · Alexander V. Lukyanov
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 <[email protected]>Nice catch, but your patch is not a "diff -p1" one
I did it for net-2.6 tree :
Thanks
Quoted 7 lines
[PATCH] tulip: fix hang in dmfe driver on sending of big packet
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 <[email protected]>Acked-by Eric Dumazet <[email protected]>
Applied.