Message ID | 20170113123919.30384-2-luca@coelho.fi (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Luca Coelho |
Headers | show |
Luca Coelho <luca@coelho.fi> writes: > From: Luca Coelho <luciano.coelho@intel.com> > > For unified images, we shouldn't restart the HW if suspend fails. The > only reason for restarting the HW with non-unified images is to go > back to the D0 image. > > Fixes: commit 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend") s/commit // :)
On Fri, 2017-01-13 at 16:13 +0200, Kalle Valo wrote: > Luca Coelho <luca@coelho.fi> writes: > > > From: Luca Coelho <luciano.coelho@intel.com> > > > > For unified images, we shouldn't restart the HW if suspend fails. The > > only reason for restarting the HW with non-unified images is to go > > back to the D0 image. > > > > Fixes: commit 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend") > > s/commit // :) Argh, did I do it again? I was specifically trying to remember this, but I guess it was not enough... -- Luca.
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index b88e2048ae0b..207d8ae1e116 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -1262,12 +1262,15 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, iwl_trans_d3_suspend(mvm->trans, test, !unified_image); out: if (ret < 0) { - iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); - if (mvm->restart_fw > 0) { - mvm->restart_fw--; - ieee80211_restart_hw(mvm->hw); - } iwl_mvm_free_nd(mvm); + + if (!unified_image) { + iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); + if (mvm->restart_fw > 0) { + mvm->restart_fw--; + ieee80211_restart_hw(mvm->hw); + } + } } out_noreset: mutex_unlock(&mvm->mutex);