]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: pcie: add debug print for resume flow if powered off
authorAaron Katzin <aaron.katzin@intel.com>
Tue, 12 May 2026 19:34:27 +0000 (22:34 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 26 May 2026 12:17:10 +0000 (15:17 +0300)
Log when the resume flow identifies based on the
scratch register that the device was powered off.

Signed-off-by: Aaron Katzin <aaron.katzin@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260512222731.42623e43fde7.Ibcd656ca845828ce6f2358f9ef80e1ddf03f8f59@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/drv.c

index 78482db732c12da09ef75acb39b24aa16c1f579c..fdafbad506a7d4fdd66817de702c0572fd055b59 100644 (file)
@@ -1239,8 +1239,12 @@ static int _iwl_pci_resume(struct device *device, bool restore)
                u32 scratch = iwl_read32(trans, CSR_FUNC_SCRATCH);
 
                if (!(scratch & CSR_FUNC_SCRATCH_POWER_OFF_MASK) ||
-                   scratch == ~0U)
+                   scratch == ~0U) {
                        device_was_powered_off = true;
+                       IWL_DEBUG_WOWLAN(trans,
+                                        "Scratch 0x%08x indicates device was powered off\n",
+                                        scratch);
+               }
        } else {
                /*
                 * bh are re-enabled by iwl_trans_pcie_release_nic_access,