From: Navon John Lukose <navonjohnlukose@gmail.com>
To: miriam.rachel.korenblit@intel.com, linux-wireless@vger.kernel.org
Cc: nika@nikableh.moe, emmanuel.grumbach@intel.com,
helgaas@kernel.org, markpearson@lenovo.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
Navon John Lukose <navonjohnlukose@gmail.com>
Subject: [PATCH wireless 2/2] wifi: iwlwifi: pcie: request a product reset when the device is gone after resume
Date: Sat, 29 Aug 2026 15:24:37 +0530 [thread overview]
Message-ID: <20260829095437.44716-3-navonjohnlukose@gmail.com> (raw)
In-Reply-To: <20260829095437.44716-1-navonjohnlukose@gmail.com>
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@vger.kernel.org
Signed-off-by: Navon John Lukose <navonjohnlukose@gmail.com>
---
--- 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
next prev parent reply other threads:[~2026-08-29 9:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 9:54 [PATCH wireless 0/2] wifi: iwlwifi: recover the device after it loses power in D3cold Navon John Lukose
2026-08-29 9:54 ` [PATCH wireless 1/2] wifi: iwlwifi: pcie: arm the product reset at probe Navon John Lukose
2026-08-29 9:54 ` Navon John Lukose [this message]
[not found] ` <20260829100758.8E8491F000E9@smtp.kernel.org>
2026-08-29 12:37 ` Navon John Lukose
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=20260829095437.44716-3-navonjohnlukose@gmail.com \
--to=navonjohnlukose@gmail.com \
--cc=emmanuel.grumbach@intel.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=markpearson@lenovo.com \
--cc=miriam.rachel.korenblit@intel.com \
--cc=nika@nikableh.moe \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®