netdev
[Top] [All Lists]

[PATCH 2.6.4-rc2-bk4 1/2] pcnet32 transmit hang fix

To: tsbogend@xxxxxxxxxxxxxxxx, jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx
Subject: [PATCH 2.6.4-rc2-bk4 1/2] pcnet32 transmit hang fix
From: Don Fry <brazilnut@xxxxxxxxxx>
Date: Mon, 8 Mar 2004 11:42:36 -0800 (PST)
Sender: netdev-bounce@xxxxxxxxxxx
Please apply the following patch to 2.6.4-rc2-bk4.

The pcnet32 driver will hang after a few frames (<30) with the 79C971
(and probably the 79C972 though I don't have the hardware to prove it).
By interrupting slightly more frequently the hang will not occur.

This patch is already included in 2.4.26-pre2.

--- orig.linux-2.6.4-rc2-bk4/drivers/net/pcnet32.c      Mon Mar  8 10:02:25 2004
+++ linux-2.6.4-rc2-bk4/drivers/net/pcnet32.c   Mon Mar  8 10:24:43 2004
@@ -1452,11 +1452,12 @@
     status = 0x8300;
     entry = (lp->cur_tx - lp->dirty_tx) & TX_RING_MOD_MASK;
     if ((lp->ltint) &&
-       ((entry == TX_RING_SIZE/2) ||
+       ((entry == TX_RING_SIZE/3) ||
+        (entry == (TX_RING_SIZE*2)/3) ||
         (entry >= TX_RING_SIZE-2)))
     {
        /* Enable Successful-TxDone interrupt if we have
-        * 1/2 of, or nearly all of, our ring buffer Tx'd
+        * 1/3, 2/3 or nearly all of, our ring buffer Tx'd
         * but not yet cleaned up.  Thus, most of the time,
         * we will not enable Successful-TxDone interrupts.
         */

-- 
Don Fry
brazilnut@xxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>