Message ID | iwlwifi.20211016114029.7ceb9eaca9f6.If0cbef38c6d07ec1ddce125878a4bdadcb35d2c9@changeid (mailing list archive) |
---|---|
State | Accepted |
Commit | 2f629a7772e2a7bdaff25178917a40073f79702c |
Delegated to: | Kalle Valo |
Headers | show |
Series | iwlwifi: fixes intended for v5.15 2021-10-16 | expand |
Luca Coelho <luca@coelho.fi> wrote: > From: Johannes Berg <johannes.berg@intel.com> > > If resume fails for some reason, we need to set the PM state > back to normal so we're able to send commands during firmware > reset, rather than failing all of them because we're in D3. > > Signed-off-by: Johannes Berg <johannes.berg@intel.com> > Fixes: 708a39aaca22 ("iwlwifi: mvm: don't send commands during suspend\resume transition") > Signed-off-by: Luca Coelho <luciano.coelho@intel.com> 5 patches applied to wireless-drivers-next.git, thanks. 2f629a7772e2 iwlwifi: mvm: reset PM state on unsuccessful resume 70382b0897ee iwlwifi: change all JnP to NO-160 configuration 0f892441d8c3 iwlwifi: pnvm: don't kmemdup() more than we have e864a77f51d0 iwlwifi: pnvm: read EFI data only if long enough 8bf26aa10a8e iwlwifi: cfg: set low-latency-xtal for some integrated So devices
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 9f706fffb592..d3013a51a509 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -2336,7 +2336,6 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) iwl_fw_dbg_collect_desc(&mvm->fwrt, &iwl_dump_desc_assert, false, 0); ret = 1; - mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED; goto err; } @@ -2385,6 +2384,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) } } + /* after the successful handshake, we're out of D3 */ mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED; /* @@ -2455,6 +2455,9 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) */ set_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status); + /* regardless of what happened, we're now out of D3 */ + mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED; + return 1; }