netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix hang in dmfe driver on sending of big packet (linux-2.6.35)
@ 2010-11-30 13:46 Alexander V. Lukyanov
  2010-11-30 13:57 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander V. Lukyanov @ 2010-11-30 13:46 UTC (permalink / raw)
  To: netdev, tori

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

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>

-- 
   Alexander.

[-- Attachment #2: dmfe.patch --]
[-- Type: text/plain, Size: 602 bytes --]

--- 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) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix hang in dmfe driver on sending of big packet (linux-2.6.35)
  2010-11-30 13:46 [PATCH] fix hang in dmfe driver on sending of big packet (linux-2.6.35) Alexander V. Lukyanov
@ 2010-11-30 13:57 ` Eric Dumazet
  2010-12-02 21:24   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2010-11-30 13:57 UTC (permalink / raw)
  To: Alexander V. Lukyanov; +Cc: netdev, tori

From: Alexander V. Lukyanov <lav@netis.ru>

Le mardi 30 novembre 2010 à 16:46 +0300, Alexander V. Lukyanov a écrit :
> 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>
> 

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.

Signed-off-by: Alexander V. Lukyanov <lav@netis.ru>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 drivers/net/tulip/dmfe.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index a9f7d5d..7064e03 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -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 */



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix hang in dmfe driver on sending of big packet (linux-2.6.35)
  2010-11-30 13:57 ` Eric Dumazet
@ 2010-12-02 21:24   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-12-02 21:24 UTC (permalink / raw)
  To: eric.dumazet; +Cc: lav, netdev, tori

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 30 Nov 2010 14:57:39 +0100

> From: Alexander V. Lukyanov <lav@netis.ru>
> 
> Le mardi 30 novembre 2010 à 16:46 +0300, Alexander V. Lukyanov a écrit :
>> 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>
>> 
> 
> 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.
> 
> Signed-off-by: Alexander V. Lukyanov <lav@netis.ru>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-02 21:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30 13:46 [PATCH] fix hang in dmfe driver on sending of big packet (linux-2.6.35) Alexander V. Lukyanov
2010-11-30 13:57 ` Eric Dumazet
2010-12-02 21:24   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).