netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ice/i40e: pci_enable_device() fixes
@ 2025-08-16  7:10 Lukas Wunner
  2025-08-16  7:10 ` [PATCH 1/3] ice: Fix enable_cnt imbalance on resume Lukas Wunner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lukas Wunner @ 2025-08-16  7:10 UTC (permalink / raw)
  To: Tony Nguyen, Przemek Kitszel; +Cc: intel-wired-lan, netdev

The ice and i40e drivers perform surplus calls to pci_enable_device()
on resume and on error recovery.  This results in the Memory Space Enable
bit in the PCI Command register not being cleared on driver unbind.

Not a catastrophic issue, so although these commits contain Fixes tags,
I recommend applying through next-queue.git to let them bake in linux-next
for a couple of weeks.

I have neither an ice nor i40e card available, so this is compile-tested
only.  I'm hoping Intel validation can test it.

Suggested test procedure:

- Unbind the driver through sysfs without having suspended the card:
  echo D:B:D.F | sudo tee /sys/bus/pci/drivers/ice/unbind
  (replace D:B:D.F with the device address, e.g. 0000:07:00.0)

- Verify with lspci that it says "Mem-" in the "Control:" register:
  lspci -vv -s D:B:D.F

- Rebind the driver:
  echo D:B:D.F | sudo tee /sys/bus/pci/drivers/ice/bind

- Suspend the card, resume the card, unbind the driver, re-run lspci.
  Expected result without this series "Mem+", with this series "Mem-".

For error recovery, the procedure is the same but instead of suspending
and resuming the card, an error needs to be injected.  See the section
on "Software error injection" in Documentation/PCI/pcieaer-howto.rst.

Thanks!

Lukas Wunner (3):
  ice: Fix enable_cnt imbalance on resume
  ice: Fix enable_cnt imbalance on PCIe error recovery
  i40e: Fix enable_cnt imbalance on PCIe error recovery

 drivers/net/ethernet/intel/i40e/i40e_main.c | 29 ++++++----------
 drivers/net/ethernet/intel/ice/ice_main.c   | 38 ++++++---------------
 2 files changed, 21 insertions(+), 46 deletions(-)

-- 
2.47.2


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

end of thread, other threads:[~2025-08-16  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-16  7:10 [PATCH 0/3] ice/i40e: pci_enable_device() fixes Lukas Wunner
2025-08-16  7:10 ` [PATCH 1/3] ice: Fix enable_cnt imbalance on resume Lukas Wunner
2025-08-16  7:10 ` [PATCH 2/3] ice: Fix enable_cnt imbalance on PCIe error recovery Lukas Wunner
2025-08-16  7:10 ` [PATCH 3/3] i40e: " Lukas Wunner

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).