netdev
[Top] [All Lists]

[PATCH 9/5 2.4.27-pre3] pcnet32: avoid timeout with tcpdump

To: tsbogend@xxxxxxxxxxxxxxxx, jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx
Subject: [PATCH 9/5 2.4.27-pre3] pcnet32: avoid timeout with tcpdump
From: Don Fry <brazilnut@xxxxxxxxxx>
Date: Wed, 26 May 2004 13:55:06 -0700 (PDT)
Sender: netdev-bounce@xxxxxxxxxxx
This patch avoids a timeout when entering/exiting promiscuous mode with
tcpdump.  All pending xmit operations are flushed and if the queue is
full the timeout will occur.  The wake_queue avoids that timeout.

--- linux-2.4.27-pre3/drivers/net/big.pcnet32.c Wed May 26 12:30:23 2004
+++ linux-2.4.27-pre3/drivers/net/pcnet32.c     Wed May 26 12:30:36 2004
@@ -22,8 +22,8 @@
  *************************************************************************/
 
 #define DRV_NAME       "pcnet32"
-#define DRV_VERSION    "1.30b"
-#define DRV_RELDATE    "05.24.2004"
+#define DRV_VERSION    "1.30c"
+#define DRV_RELDATE    "05.25.2004"
 #define PFX            DRV_NAME ": "
 
 static const char *version =
@@ -244,6 +244,7 @@
  * v1.30a  22 May 2004 Don Fry limit frames received during interrupt.
  * v1.30b  24 May 2004 Don Fry fix bogus tx carrier errors with 79c973,
  *        assisted by Bruce Penrod <bmpenrod@xxxxxxxxxxxxxxxxxxxxxx>.
+ * v1.30c  25 May 2004 Don Fry added netif_wake_queue after pcnet32_restart.
  */
 
 
@@ -1858,6 +1859,7 @@
            /* stop the chip to clear the error condition, then restart */
            lp->a.write_csr (ioaddr, 0, 0x0004);
            pcnet32_restart(dev, 0x0002);
+           netif_wake_queue(dev);
        }
     }
 
@@ -2123,8 +2125,9 @@
     }
 
     lp->a.write_csr (ioaddr, 0, 0x0004); /* Temporarily stop the lance. */
-
     pcnet32_restart(dev, 0x0042); /*  Resume normal operation */
+    netif_wake_queue(dev);
+
     spin_unlock_irqrestore(&lp->lock, flags);
 }
 

-- 
Don Fry
brazilnut@xxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 9/5 2.4.27-pre3] pcnet32: avoid timeout with tcpdump, Don Fry <=