From: David Gundersen <gundy@iinet.net.au>
To: netdev@vger.kernel.org
Cc: Francois Romieu <romieu@fr.zoreil.com>,
Benjamin LaHaise <bcrl@kvack.org>
Subject: Re: r8169 tx problem (1s pause with ping)
Date: Wed, 20 Jun 2007 18:57:43 +1000 [thread overview]
Message-ID: <4678EC07.8050700@iinet.net.au> (raw)
In-Reply-To: <20070619230641.GD14681@electric-eye.fr.zoreil.com>
> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
> index 8f3e0da..8c0851f 100644
> --- a/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c
> @@ -2682,6 +2688,8 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
> (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
> netif_wake_queue(dev);
> }
> + if (tp->dirty_tx != tp->cur_rx)
> + RTL_W8(TxPoll, NPQ);
> }
> }
>
Hi Francois,
A few things:
- Why are you checking dirty_tx against cur_rx (shouldn't it be cur_tx?)?
- Is there a possibility that the driver could be triggering the card to
send invalid packets with that code?
I'm thinking in _start_xmit, the cur_tx pointer (assuming that's what
you meant to include above) gets incremented when the packet is sent to
the card (the RTL_W8(TxPoll,NPQ)) to indicate that the card _should_ be
able to process packets up to that point in the queue.
The interrupt routine comes along later to clean up the buffers between
dirty_tx (the last packet that the driver knows the card has sent) and
cur_tx (the point that the card could potentially be up to). What
seems could happen with the code above is that the card gets told that a
packet is ready to be sent when really it's not. I'm not sure how it
would deal with such a situation.
Regards,
Dave.
next prev parent reply other threads:[~2007-06-20 8:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 0:41 r8169 tx problem (1s pause with ping) Benjamin LaHaise
2007-06-13 21:18 ` Francois Romieu
2007-06-14 15:33 ` David Gundersen
2007-06-14 22:00 ` Francois Romieu
2007-06-19 23:06 ` Francois Romieu
2007-06-20 8:57 ` David Gundersen [this message]
2007-06-20 21:15 ` Francois Romieu
2007-06-18 15:14 ` Benjamin LaHaise
2007-06-19 10:45 ` David Gundersen
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=4678EC07.8050700@iinet.net.au \
--to=gundy@iinet.net.au \
--cc=bcrl@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/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).