From: "François-Xavier Gsell" <fxgsell@gmail.com>
To: intel-wired-lan@lists.osuosl.org,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: netdev@vger.kernel.org, "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>,
"François-Xavier Gsell" <fxgsell@gmail.com>
Subject: [PATCH iwl-net 0/2] igc/igb: recover register access on resume
Date: Sat, 5 Dec 2026 19:37:08 +0800 [thread overview]
Message-ID: <20261205113710.1833153-1-fxgsell@gmail.com> (raw)
When a register read returns all-ones, igc and igb set hw->hw_addr to
NULL (igc also detaches the netdev). Only the AER slot_reset handler
restores it, so when the fault is not reported through AER the adapter
stays dead until it is removed and rescanned. Suspend/resume even
re-attaches the netdev with register access still disabled.
On an I225-V (rev 03) behind an AMD 600 series chipset switch this
happens about once a week: MMIO reads return all-ones while
pci_device_is_present() is still true. Config space taken after one
such event shows BAR0 and BAR3 reading zero with Memory Space Enable
still set, and the device's AER registers hold an Unsupported Request
for a read of BAR0 + 0xc030, the register igc failed to read. This
machine boots with pcie_aspm=off, so Linux does not request _OSC
control and native AER is off; nothing was reported and
igc_io_slot_reset() never ran. As far as I can tell a UR on a read
is advisory non-fatal, so native AER would likely only have logged
it. The same symptom is reported on other AMD boards with I225-V and
I226-V.
These patches restore hw_addr in the resume path, as ixgbe_resume()
already does.
Tested on 7.3.6 with the I225-V by clearing Memory Space Enable with
setpci for a few seconds to trigger the detach, re-enabling it, then
suspending and resuming (rtcwake -m mem):
without the patch: "Link detected: no", register reads stay
all-ones, interface unusable
with the patch: "NIC Link is Up 2500 Mbps Full Duplex" after
resume, DHCP lease and traffic work
In both runs the suspend of the detached adapter logs AMD-Vi
IO_PAGE_FAULTs from the device, because the driver cannot stop DMA
without register access. That is unchanged by this series.
Not yet confirmed on a real event: after the one real detach that
was followed by a suspend, the BARs read zero again a day later, so
either the restore on resume did not stick or the device lost them
again. Recovering a real event may need the BARs checked and restored
at runtime too.
The igb change is compile-tested only (W=1, no new warnings); I have
no igb hardware.
This series was prepared with an AI coding assistant (Claude Opus 5.5 in
Claude Code), as noted in each commit message. Over one long session I
asked it why the NIC kept dropping off the bus and then to prepare an
upstream fix. It read the kernel logs and the igc/igb/ixgbe sources,
found the missing hw_addr restore, wrote both patches and their
changelogs, and wrote the setpci + rtcwake reproducer and the script
that captured the config space quoted above. I ran the captures and the
tests on the hardware, and I have reviewed every line of the patches.
Recovering without a suspend cycle when the device is still present
is a separate change and is not part of this series.
François-Xavier Gsell (2):
igc: restore hw_addr on resume after a failed register read
igb: restore hw_addr on resume after a failed register read
drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++
drivers/net/ethernet/intel/igc/igc_main.c | 4 ++++
2 files changed, 8 insertions(+)
--
2.56.1
next reply other threads:[~2026-12-05 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 11:37 François-Xavier Gsell [this message]
2026-12-05 11:37 ` [PATCH iwl-net 1/2] igc: restore hw_addr on resume after a failed register read François-Xavier Gsell
2026-12-05 11:37 ` [PATCH iwl-net 2/2] igb: " François-Xavier Gsell
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=20261205113710.1833153-1-fxgsell@gmail.com \
--to=fxgsell@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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