Netdev List
 help / color / mirror / Atom feed
* [PATCH iwl-net 0/2] igc/igb: recover register access on resume
@ 2026-12-05 11:37 François-Xavier Gsell
  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
  0 siblings, 2 replies; 3+ messages in thread
From: François-Xavier Gsell @ 2026-12-05 11:37 UTC (permalink / raw)
  To: intel-wired-lan, Tony Nguyen, Przemek Kitszel
  Cc: netdev, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, François-Xavier Gsell

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-05 11:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 11:37 [PATCH iwl-net 0/2] igc/igb: recover register access on resume François-Xavier Gsell
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox