When an AX211 loses power across s2idle, RX shutdown can poll an inaccessible peripheral register during PCI resume. The register-read helper returns 0x5a5a5a5a when NIC access fails, hiding the failure from the polling loop. Each iteration can then incur another NIC-access timeout, although only the polling delay is charged to the timeout budget. On a ThinkPad L14 Gen 3 running 7.2.8-9-omarchy, function-graph tracing measured 7.91 seconds in iwl_poll_prph_bit() for the RX stop caller's 1000-us timeout. The surrounding PCI resume callback took 8.26 seconds, leaving the desktop visibly frozen after opening the lid. Acquire NIC access explicitly for each peripheral read and return -ETIMEDOUT immediately when acquisition fails. Preserve the existing acquire/read/release sequence, mask comparison, polling delay and retry budget while register access succeeds. This also avoids treating the failure placeholder as a matching register value. With the equivalent change backported to the affected 7.2.8 driver, the poll took 76.24 ms and PCI resume took 400.79 ms. Wake responsiveness and Wi-Fi connectivity were confirmed on the affected machine. Link: https://github.com/omacom/omarchy-pkgs/pull/1493 Signed-off-by: Jared Hooker --- Submission notes: - Rebased onto iwlwifi-next/next at 3627924ed81f, where the helper is named iwl_pcie_poll_prph_bit() in pcie/utils.c. - Hardware testing used the equivalent iwl-io.c backport on 7.2.8-9-omarchy with an Intel AX211 (8086:51f0), firmware 89.d2579d43.0, and ThinkPad L14 Gen 3 BIOS R1XET52W (1.34). - Before/after function-graph timings: before after peripheral poll 7,914,548 us 76,235.97 us RX stop 7,994,772 us 152,336.40 us PCI resume 8,257,866 us 400,792.70 us - Six mocked-transport C regression cases pass against the actual adapted helper. The original helper fails the access-failure case. - The affected driver module subtree builds against the installed 7.2.8 headers, as does the updated pcie/utils.o from this upstream tree. A complete build/boot of iwlwifi-next has not been performed. - checkpatch.pl reports zero errors and warnings. - This fixes repeated polling after access failure; it does not establish why the device lost power or identify the original version regression. drivers/net/wireless/intel/iwlwifi/pcie/utils.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/utils.c b/drivers/net/wireless/intel/iwlwifi/pcie/utils.c index 8aa43e5..0962df4 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/utils.c @@ -139,7 +139,16 @@ int iwl_pcie_poll_prph_bit(struct iwl_trans *trans, u32 addr, int t = 0; do { - if ((iwl_trans_read_prph(trans, addr) & mask) == (bits & mask)) + u32 val; + + /* Do not retry register reads when the NIC is inaccessible. */ + if (!iwl_trans_grab_nic_access(trans)) + return -ETIMEDOUT; + + val = iwl_trans_read_prph_no_grab(trans, addr); + iwl_trans_release_nic_access(trans); + + if ((val & mask) == (bits & mask)) return 0; udelay(IWL_PCIE_POLL_INTERVAL); t += IWL_PCIE_POLL_INTERVAL; base-commit: 3627924ed81fd7783394fb2555ea179c6606a231 -- 2.56.0