linux/drivers/net/ethernet/amd
Nikhil P. Rao 57d635329d pds_core: cancel pending PCI reset work on AER recovery
pdsc_check_pci_health() queues pci_reset_work when it sees a broken PCI
connection, and nothing cancels it. When the PCI core starts AER
recovery, pdsc_pci_error_detected() runs pdsc_reset_prepare() and
recovers the device, but a pci_reset_work queued just before is left
pending. If it runs after recovery released the device lock, it resets a
device the driver now considers healthy, bouncing the link for no reason.

Cancel pci_reset_work in pdsc_pci_error_detected() after
pdsc_reset_prepare(), which has already stopped the health thread so it
cannot requeue the work. cancel_work_sync() is safe under the device
lock here because pdsc_pci_reset_thread() uses pci_try_reset_function(),
which returns instead of blocking on the lock. Only PFs initialize
pci_reset_work, so guard the cancel with !is_virtfn.

Fixes: 81665adf25 ("pds_core: Fix pdsc_check_pci_health function to use work thread")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260714180223.1642792-2-nikhil.rao%40amd.com?part=1
Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260727170030.361116-1-nikhil.rao@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-30 16:44:26 -07:00
..
pds_core pds_core: cancel pending PCI reset work on AER recovery 2026-07-30 16:44:26 -07:00
xgbe amd-xgbe: fix MAC_AUTO_SW handling in CL37 AN 2026-07-21 09:12:36 -07:00
7990.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
7990.h net: 7990: Fix use correct return type for ndo_start_xmit() 2020-05-06 14:26:14 -07:00
a2065.c net: Use named initializer for zorro_device_id arrays 2026-05-28 18:07:11 -07:00
a2065.h
amd8111e.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
amd8111e.h net: amd8111e: Remove duplicate definition of PCI_VENDOR_ID_AMD 2024-10-28 15:48:51 -07:00
ariadne.c net: Use named initializer for zorro_device_id arrays 2026-05-28 18:07:11 -07:00
ariadne.h
atarilance.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
au1000_eth.c net: au1000: move free_irq out of the close-time spinlocked section 2026-06-23 19:10:29 -07:00
au1000_eth.h au1000_eth: stop using virt_to_bus() 2022-06-08 11:32:02 -07:00
declance.c declance: Include the offending address with DMA errors 2026-03-31 19:32:41 -07:00
hplance.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
hplance.h
Kconfig drivers: net: amd: nmclan: Remove this driver 2026-04-23 15:56:49 -07:00
Makefile drivers: net: amd: nmclan: Remove this driver 2026-04-23 15:56:49 -07:00
mvme147.c net: amd: mvme147: Fix probe banner message 2024-10-09 12:45:51 +01:00
pcnet32.c pcnet32: stop holding device spin lock during napi_complete_done 2026-06-02 11:26:30 -07:00
sun3lance.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
sunlance.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00