On Tue, Jan 09, 2007 at 06:44:49PM +0100, Thibaut VARENE wrote:
> On 1/9/07, Jarek Poplawski <[EMAIL PROTECTED]> wrote:
> >On Tue, Jan 09, 2007 at 11:27:59AM +0100, Thibaut VARENE wrote:
> >...
> >> I suspected both and changed both the disk and the ram for quality
> >> parts, that I tested afterwards. Both passed thorough tests.
> >>
> >> Finally, using the other NIC on the box (a VIA Rhine II, 100Mbps),
> >> works absolutely fine.
> >
> >If you are not tired, I'd suggest two more tests:
> 
> I volunteered to help :)

Thank you Thibaut.  Please try the following patch:

From: Dale Farnsworth <[EMAIL PROTECTED]>

Reserve one unused descriptor in the TX ring
to facilitate testing for when the ring is full.

---

Signed-off-by: Dale Farnsworth <[EMAIL PROTECTED]>

 drivers/net/mv643xx_eth.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 9997081..72f82ba 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -289,7 +289,7 @@ static void mv643xx_eth_tx_timeout_task(
        eth_port_reset(mp->port_num);
        eth_port_start(dev);
 
-       if (mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
+       if (mp->tx_ring_size - mp->tx_desc_count > MAX_DESCS_PER_SKB)
                netif_wake_queue(dev);
 }
 
@@ -356,7 +356,7 @@ static void mv643xx_eth_free_completed_t
        struct mv643xx_private *mp = netdev_priv(dev);
 
        if (mv643xx_eth_free_tx_descs(dev, 0) &&
-           mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
+           mp->tx_ring_size - mp->tx_desc_count > MAX_DESCS_PER_SKB)
                netif_wake_queue(dev);
 }
 
@@ -536,7 +536,7 @@ static irqreturn_t mv643xx_eth_int_handl
                                                   ETH_TX_QUEUES_ENABLED);
                        if (!netif_carrier_ok(dev)) {
                                netif_carrier_on(dev);
-                               if (mp->tx_ring_size - mp->tx_desc_count >=
+                               if (mp->tx_ring_size - mp->tx_desc_count >
                                                        MAX_DESCS_PER_SKB)
                                        netif_wake_queue(dev);
                        }
@@ -1194,7 +1194,7 @@ static int mv643xx_eth_start_xmit(struct
        BUG_ON(netif_queue_stopped(dev));
        BUG_ON(skb == NULL);
 
-       if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB) {
+       if (mp->tx_ring_size - mp->tx_desc_count <= MAX_DESCS_PER_SKB) {
                printk(KERN_ERR "%s: transmit with queue full\n", dev->name);
                netif_stop_queue(dev);
                return 1;
@@ -1216,7 +1216,7 @@ static int mv643xx_eth_start_xmit(struct
        stats->tx_packets++;
        dev->trans_start = jiffies;
 
-       if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB)
+       if (mp->tx_ring_size - mp->tx_desc_count <= MAX_DESCS_PER_SKB)
                netif_stop_queue(dev);
 
        spin_unlock_irqrestore(&mp->lock, flags);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to