Skip to content

Commit 9715246

Browse files
gabaydjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: Use the sync timepoint API in suspend
When starting the suspend flow, HOST_D3_START triggers an _async_ firmware dump collection for debugging purposes. The async worker may race with suspend flow and fail to get NIC access, resulting in the following warning: "Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)" Fix this by switching to the sync version to ensure the dump completes before proceeding with the suspend flow, avoiding potential race issues. Signed-off-by: Daniel Gabay <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241010140328.9aae318cd593.I4b322009f39489c0b1d8893495c887870f73ed9c@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent cbe84e9 commit 9715246

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/net/wireless/intel/iwlwifi/fw/init.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans,
3939
}
4040
IWL_EXPORT_SYMBOL(iwl_fw_runtime_init);
4141

42+
/* Assumes the appropriate lock is held by the caller */
4243
void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt)
4344
{
4445
iwl_fw_suspend_timestamp(fwrt);
45-
iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START, NULL);
46+
iwl_dbg_tlv_time_point_sync(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START,
47+
NULL);
4648
}
4749
IWL_EXPORT_SYMBOL(iwl_fw_runtime_suspend);
4850

drivers/net/wireless/intel/iwlwifi/mvm/d3.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,9 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
13981398

13991399
iwl_mvm_pause_tcm(mvm, true);
14001400

1401+
mutex_lock(&mvm->mutex);
14011402
iwl_fw_runtime_suspend(&mvm->fwrt);
1403+
mutex_unlock(&mvm->mutex);
14021404

14031405
return __iwl_mvm_suspend(hw, wowlan, false);
14041406
}

0 commit comments

Comments
 (0)