[PATCH wireless 2/2] wifi: iwlwifi: pcie: request a product reset when the device is gone after resume
From: Navon John Lukose
Date: Sat Aug 29 2026 - 05:56:32 EST
On platforms where D3cold removes the WiFi module's power rail, the
device can come back from suspend completely absent from the bus: config
space reads 0xffffffff and the downstream link never trains.
_iwl_pci_resume() currently notices only a subset of this (scratch ==
~0U, and only when the device was enabled), then "hopes for the best" by
re-initialising over PCI, which cannot work - the hardware is not there.
The result is several seconds of handshake timeouts and a bogus
ADVANCED_SYSASSERT dump before giving up, and the device stays gone
until reboot.
Check whether the device answers config cycles at all, and if not ask
for a product reset, which power-cycles the module and re-enumerates it.
The check is deliberately placed before the STATUS_DEVICE_ENABLED block:
that block is skipped entirely when the device was idle or down at
suspend time, which is a common case (e.g. the radio was switched off)
and one where the device is just as dead.
Fixes: 9673c35486d4 ("wifi: iwlwifi: implement product reset for TOP errors")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221695
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Navon John Lukose <navonjohnlukose@xxxxxxxxx>
---
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1232,6 +1232,18 @@
if (!trans->op_mode)
return 0;
+ /* Not answering config cycles: it fell off the bus and will not come
+ * back from a PCI-level re-init. Deliberately checked before the
+ * STATUS_DEVICE_ENABLED block below, which is skipped entirely if the
+ * device was idle or down when we suspended.
+ */
+ if (!pci_device_is_present(pdev)) {
+ IWL_ERR(trans,
+ "device is not on the bus after resume, requesting product reset\n");
+ iwl_trans_pcie_reset(trans, IWL_RESET_MODE_PROD_RESET);
+ return 0;
+ }
+
if (test_bit(STATUS_DEVICE_ENABLED, &trans->status)) {
/*
* Scratch value was altered, this means the device was powered