From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Daniel Gabay <daniel.gabay@intel.com>,
Miri Korenblit <miriam.rachel.korenblit@intel.com>,
Johannes Berg <johannes.berg@intel.com>,
Sasha Levin <sashal@kernel.org>,
kvalo@kernel.org, shaul.triebitz@intel.com,
gregory.greenman@intel.com, yedidya.ben.shimol@intel.com,
benjamin.berg@intel.com, emmanuel.grumbach@intel.com,
linux-wireless@vger.kernel.org
Subject: [PATCH AUTOSEL 6.11 10/21] wifi: iwlwifi: mvm: Use the sync timepoint API in suspend
Date: Mon, 4 Nov 2024 05:49:46 -0500 [thread overview]
Message-ID: <20241104105048.96444-10-sashal@kernel.org> (raw)
In-Reply-To: <20241104105048.96444-1-sashal@kernel.org>
From: Daniel Gabay <daniel.gabay@intel.com>
[ Upstream commit 9715246ca0bfc9feaec1b4ff5b3d38de65a7025d ]
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 <daniel.gabay@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241010140328.9aae318cd593.I4b322009f39489c0b1d8893495c887870f73ed9c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/intel/iwlwifi/fw/init.c | 4 +++-
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/init.c b/drivers/net/wireless/intel/iwlwifi/fw/init.c
index d8b083be5b6b5..de87e0e3e0725 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/init.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/init.c
@@ -39,10 +39,12 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans,
}
IWL_EXPORT_SYMBOL(iwl_fw_runtime_init);
+/* Assumes the appropriate lock is held by the caller */
void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt)
{
iwl_fw_suspend_timestamp(fwrt);
- iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START, NULL);
+ iwl_dbg_tlv_time_point_sync(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START,
+ NULL);
}
IWL_EXPORT_SYMBOL(iwl_fw_runtime_suspend);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 99a541d442bb1..f4f87edb86e5c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -1398,7 +1398,9 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
iwl_mvm_pause_tcm(mvm, true);
+ mutex_lock(&mvm->mutex);
iwl_fw_runtime_suspend(&mvm->fwrt);
+ mutex_unlock(&mvm->mutex);
return __iwl_mvm_suspend(hw, wowlan, false);
}
--
2.43.0
next prev parent reply other threads:[~2024-11-04 10:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 10:49 [PATCH AUTOSEL 6.11 01/21] wifi: mac80211: Fix setting txpower with emulate_chanctx Sasha Levin
2024-11-04 10:49 ` [PATCH AUTOSEL 6.11 02/21] wifi: cfg80211: Add wiphy_delayed_work_pending() Sasha Levin
2024-11-04 10:49 ` [PATCH AUTOSEL 6.11 03/21] wifi: mac80211: Convert color collision detection to wiphy work Sasha Levin
2024-11-04 10:49 ` [PATCH AUTOSEL 6.11 04/21] wifi: radiotap: Avoid -Wflex-array-member-not-at-end warnings Sasha Levin
2024-11-04 10:49 ` Sasha Levin [this message]
2024-11-04 10:49 ` [PATCH AUTOSEL 6.11 11/21] wifi: iwlwifi: mvm: SAR table alignment Sasha Levin
2024-11-04 10:49 ` [PATCH AUTOSEL 6.11 12/21] mac80211: fix user-power when emulating chanctx Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241104105048.96444-10-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=benjamin.berg@intel.com \
--cc=daniel.gabay@intel.com \
--cc=emmanuel.grumbach@intel.com \
--cc=gregory.greenman@intel.com \
--cc=johannes.berg@intel.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=shaul.triebitz@intel.com \
--cc=stable@vger.kernel.org \
--cc=yedidya.ben.shimol@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).