From: Florian Westphal <fw@strlen.de>
To: Tomas Szepe <szepe@pinerecords.com>
Cc: Florian Westphal <fw@strlen.de>,
Francois Romieu <romieu@fr.zoreil.com>,
Hayes Wang <hayeswang@realtek.com>,
Eric Dumazet <edumazet@google.com>,
Tom Herbert <therbert@google.com>,
"David S. Miller" <davem@davemloft.net>,
Marco Berizzi <pupilla@hotmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: 1e918876 breaks r8169 (linux-3.18+)
Date: Tue, 3 Feb 2015 11:42:14 +0100 [thread overview]
Message-ID: <20150203104214.GG24751@breakpoint.cc> (raw)
In-Reply-To: <20150203100816.GA5807@louise.pinerecords.com>
Tomas Szepe <szepe@pinerecords.com> wrote:
> Hi,
>
> Since linux-3.18.0, r8169 is having problems driving one of my add-on
> PCIe NICs. The interface is losing link for several seconds at a time,
> the frequency being about once a minute when the traffic is high.
>
> The first loss of link is accompanied by the message "NETDEV WATCHDOG:
> eth1 (r8169): transmit queue 0 timed out" and a call trace, while
> subsequent occurrences only report "r8169 0000:01:00.0 eth1: link up"
> (w/o the complementary "link down" message).
>
> I've traced the culprit down to commit 1e918876, "r8169: add support
> for Byte Queue Limits" by Florian Westphal <fw@strlen.de>. Reverting
> the patch appears to fix the problem on linux-3.18.5.
> The same issue might already have been reported by Marco Berizzi here:
> http://lkml.org/lkml/2014/12/11/65
Thanks for reporting this! I'm no lkml subscriber and thus did not
see earlier report.
I'll try to reproduce this but unfortunately I am currently travelling
and won't have access to my r8169 nic until Feb 10th.
If you're willing to experiment (not even compile tested):
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5067,8 +5067,6 @@ static void rtl_hw_reset(struct rtl8169_private *tp)
RTL_W8(ChipCmd, CmdReset);
rtl_udelay_loop_wait_low(tp, &rtl_chipcmd_cond, 100, 100);
-
- netdev_reset_queue(tp->dev);
}
static void rtl_request_uncached_firmware(struct rtl8169_private *tp)
@@ -6773,6 +6771,7 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)
{
rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC);
tp->cur_tx = tp->dirty_tx = 0;
+ netdev_reset_queue(tp->dev);
}
static void rtl_reset_work(struct rtl8169_private *tp)
@@ -7231,9 +7230,9 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
tx_left--;
}
- if (tp->dirty_tx != dirty_tx) {
- netdev_completed_queue(tp->dev, pkts_compl, bytes_compl);
+ netdev_completed_queue(tp->dev, pkts_compl, bytes_compl);
+ if (tp->dirty_tx != dirty_tx) {
u64_stats_update_begin(&tp->tx_stats.syncp);
tp->tx_stats.packets += pkts_compl;
tp->tx_stats.bytes += bytes_compl;
@@ -7263,6 +7262,8 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
RTL_W8(TxPoll, NPQ);
}
+ } else {
+ WARN_ON_ONCE(pkts_compl);
}
}
next prev parent reply other threads:[~2015-02-03 10:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 10:08 1e918876 breaks r8169 (linux-3.18+) Tomas Szepe
2015-02-03 10:42 ` Florian Westphal [this message]
2015-02-05 16:56 ` Tomáš Szépe
2015-02-06 14:04 ` Tomas Szepe
2015-02-08 12:18 ` Holger Hoffstätte
2015-02-10 15:45 ` Florian Westphal
2015-02-11 9:46 ` Tomáš Szépe
2015-02-21 10:15 ` Tomas Szepe
2015-02-21 10:31 ` Florian Westphal
2015-02-21 10:57 ` Holger Hoffstätte
2015-02-21 16:22 ` Eric Dumazet
2015-02-21 17:46 ` Florian Westphal
2015-02-21 18:09 ` Eric Dumazet
2015-02-21 18:32 ` Florian Westphal
2015-02-21 19:26 ` Tomas Szepe
2015-02-21 19:05 ` Tomas Szepe
2015-02-21 19:54 ` Eric Dumazet
2015-02-22 0:41 ` Tomas Szepe
2015-02-22 20:57 ` David Miller
[not found] <E1YqR6a-0007T7-Dz@feisty.vs19.net>
2015-05-07 19:22 ` Daniel Exner
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=20150203104214.GG24751@breakpoint.cc \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hayeswang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pupilla@hotmail.com \
--cc=romieu@fr.zoreil.com \
--cc=szepe@pinerecords.com \
--cc=therbert@google.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