From: "Dale Farnsworth" <dale@farnsworth.org>
To: Thibaut VARENE <T-Bone@parisc-linux.org>
Cc: Jarek Poplawski <jarkao2@o2.pl>,
netdev@vger.kernel.org, mlachwani@mvista.com
Subject: Re: kernel BUG in eth_alloc_tx_desc_index at drivers/net/mv643xx_eth.c:1069!
Date: Tue, 9 Jan 2007 13:05:41 -0700 [thread overview]
Message-ID: <20070109200541.GA27089@xyzzy.farnsworth.org> (raw)
In-Reply-To: <7d01f9f00701090944o62f39fb4yfaa5449c2d2d010d@mail.gmail.com>
On Tue, Jan 09, 2007 at 06:44:49PM +0100, Thibaut VARENE wrote:
> On 1/9/07, Jarek Poplawski <jarkao2@o2.pl> 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 <dale@farnsworth.org>
Reserve one unused descriptor in the TX ring
to facilitate testing for when the ring is full.
---
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
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);
next prev parent reply other threads:[~2007-01-09 20:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-05 19:03 kernel BUG in eth_alloc_tx_desc_index at drivers/net/mv643xx_eth.c:1069! Thibaut VARENE
2007-01-09 9:26 ` Jarek Poplawski
2007-01-09 10:27 ` Thibaut VARENE
2007-01-09 10:52 ` Jarek Poplawski
2007-01-09 10:56 ` Thibaut VARENE
2007-01-09 11:48 ` Jarek Poplawski
2007-01-09 10:57 ` Jarek Poplawski
2007-01-09 13:02 ` Jarek Poplawski
2007-01-09 17:44 ` Thibaut VARENE
2007-01-09 20:05 ` Dale Farnsworth [this message]
2007-01-09 21:05 ` Thibaut VARENE
2007-01-10 17:12 ` Thibaut VARENE
2007-01-11 10:42 ` [PATCH] " Jarek Poplawski
2007-01-21 12:18 ` Thibaut VARENE
2007-01-21 13:02 ` Thibaut VARENE
2007-01-22 10:02 ` Jarek Poplawski
2007-01-22 17:06 ` Dale Farnsworth
2007-01-23 8:17 ` Jarek Poplawski
2007-01-23 11:52 ` Thibaut VARENE
2007-01-23 12:42 ` Thibaut VARENE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070109200541.GA27089@xyzzy.farnsworth.org \
--to=dale@farnsworth.org \
--cc=T-Bone@parisc-linux.org \
--cc=jarkao2@o2.pl \
--cc=mlachwani@mvista.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).