wifi: iwlwifi: fix the check for the SCRATCH register upon resume
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 20 Apr 2025 07:00:01 +0000 (10:00 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 23 Apr 2025 12:45:29 +0000 (14:45 +0200)
commita17821321a9b42f26e77335cd525fee72dc1cd63
treef13dc3ed8dbcae941af81644d35f9b3a1e8380f5
parent15220a257319ffe3bf95796326dfe0aacdbeb1c4
wifi: iwlwifi: fix the check for the SCRATCH register upon resume

We can't rely on the SCRATCH register being 0 on platform that power
gate the NIC in S3. Even in those platforms, the SCRATCH register is
still returning 0x1010000.

Make sure that we understand that those platforms have powered off the
device.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219597
Fixes: cb347bd29d0d ("wifi: iwlwifi: mvm: fix hibernation")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250420095642.a7e082ee785c.I9418d76f860f54261cfa89e1f7ac10300904ba40@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c