From: Steffen Dirkwinkel <lists@steffen.cc>
To: "Tony Nguyen" <anthony.l.nguyen@intel.com>,
"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"David Ertman" <david.m.ertman@intel.com>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Willem de Bruijn" <willemb@google.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Helge Deller <deller@kernel.org>,
Kurt Kanzenbach <kurt@linutronix.de>,
Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>,
stable@vger.kernel.org
Subject: [PATCH iwl-net 4/5] igc: let dev_watchdog reset the adapter after a Tx hang
Date: Mon, 23 Nov 2026 10:55:18 +0100 [thread overview]
Message-ID: <20261123-e1000e-tx-hang-v1-4-ecb4309942f1@beckhoff.com> (raw)
In-Reply-To: <20261123-e1000e-tx-hang-v1-0-ecb4309942f1@beckhoff.com>
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Like e1000e and igb, igc stops the queue on every Tx hang report and
relies on dev_watchdog() to reset the adapter. Since commit
95ecba62e2fd ("net: fix races in netdev_tx_sent_queue()/dev_watchdog()")
every stop also writes trans_start, so the watchdog timeout can't
expire as long as the hang is reported again in time.
Since commit 8dcf2c212078 ("igc: Get rid of spurious interrupts") a
report needs an interrupt from traffic, and the adapter is reset only
if a stopped queue sees none for 5 s. The 6.1 and 6.6 stable trees have
the first commit but not the second: there the igc watchdog forces an
interrupt every two seconds and the adapter is never reset.
Stop the queue only if it isn't stopped yet.
Found by code inspection after the same problem in e1000e. Tested on an
I226-IT with the Tx queues disabled through TXDCTL and the second
commit reverted: without this change Tx never recovered in 8 of 8
tries, with it the watchdog reset the adapter after 14 to 17 s in 8 of
8. With unmodified interrupt handling Tx recovered with and without
this change.
Fixes: 95ecba62e2fd ("net: fix races in netdev_tx_sent_queue()/dev_watchdog()")
Cc: stable@vger.kernel.org
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 1fb5f3cbe93c..a2d383f79a29 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3281,8 +3281,15 @@ static bool igc_clean_tx_irq(struct igc_q_vector *q_vector, int napi_budget)
tx_buffer->next_to_watch,
jiffies,
tx_buffer->next_to_watch->wb.status);
- netif_stop_subqueue(tx_ring->netdev,
- tx_ring->queue_index);
+ /* The hang is reported again on every watchdog run,
+ * but stop the queue only once: stopping it again
+ * would also restart the Tx timeout, so dev_watchdog()
+ * would never reset the adapter.
+ */
+ if (!__netif_subqueue_stopped(tx_ring->netdev,
+ tx_ring->queue_index))
+ netif_stop_subqueue(tx_ring->netdev,
+ tx_ring->queue_index);
/* we are about to reset, no point in enabling stuff */
return true;
--
2.56.1
next prev parent reply other threads:[~2026-11-23 9:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 9:55 [PATCH iwl-net 0/5] intel: fix a Tx hang at boot on I219 and Tx hang recovery Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 1/5] e1000e: retry a global reset the I219 didn't apply Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 2/5] e1000e: let dev_watchdog reset the adapter after a Tx hang Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 3/5] igb: " Steffen Dirkwinkel
2026-11-23 9:55 ` Steffen Dirkwinkel [this message]
2026-11-23 9:55 ` [PATCH iwl-net 5/5] e1000: " Steffen Dirkwinkel
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=20261123-e1000e-tx-hang-v1-4-ecb4309942f1@beckhoff.com \
--to=lists@steffen.cc \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=david.m.ertman@intel.com \
--cc=deller@kernel.org \
--cc=edumazet@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=s.dirkwinkel@beckhoff.com \
--cc=stable@vger.kernel.org \
--cc=toke@redhat.com \
--cc=willemb@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