From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
Miri Korenblit <miriam.rachel.korenblit@intel.com>,
Johannes Berg <johannes.berg@intel.com>,
Sasha Levin <sashal@kernel.org>,
kvalo@kernel.org, gregory.greenman@intel.com,
ilan.peer@intel.com, shaul.triebitz@intel.com,
benjamin.berg@intel.com, linux-wireless@vger.kernel.org
Subject: [PATCH AUTOSEL 6.6 18/20] wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead
Date: Tue, 3 Sep 2024 15:23:50 -0400 [thread overview]
Message-ID: <20240903192425.1107562-18-sashal@kernel.org> (raw)
In-Reply-To: <20240903192425.1107562-1-sashal@kernel.org>
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[ Upstream commit 3a84454f5204718ca5b4ad2c1f0bf2031e2403d1 ]
There is a WARNING in iwl_trans_wait_tx_queues_empty() (that was
recently converted from just a message), that can be hit if we
wait for TX queues to become empty after firmware died. Clearly,
we can't expect anything from the firmware after it's declared dead.
Don't call iwl_trans_wait_tx_queues_empty() in this case. While it could
be a good idea to stop the flow earlier, the flush functions do some
maintenance work that is not related to the firmware, so keep that part
of the code running even when the firmware is not running.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240825191257.a7cbd794cee9.I44a739fbd4ffcc46b83844dd1c7b2eb0c7b270f6@changeid
[edit commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index f973efbbc3795..d2daea3b1f38a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -5589,6 +5589,10 @@ static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop)
int i;
if (!iwl_mvm_has_new_tx_api(mvm)) {
+ /* we can't ask the firmware anything if it is dead */
+ if (test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED,
+ &mvm->status))
+ return;
if (drop) {
mutex_lock(&mvm->mutex);
iwl_mvm_flush_tx_path(mvm,
@@ -5673,8 +5677,11 @@ void iwl_mvm_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
/* this can take a while, and we may need/want other operations
* to succeed while doing this, so do it without the mutex held
+ * If the firmware is dead, this can't work...
*/
- if (!drop && !iwl_mvm_has_new_tx_api(mvm))
+ if (!drop && !iwl_mvm_has_new_tx_api(mvm) &&
+ !test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED,
+ &mvm->status))
iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
}
--
2.43.0
next prev parent reply other threads:[~2024-09-03 20:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 19:23 [PATCH AUTOSEL 6.6 01/20] ASoC: SOF: mediatek: Add missing board compatible Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 02/20] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 03/20] ASoC: allow module autoloading for table db1200_pids Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 04/20] ASoC: allow module autoloading for table board_ids Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 05/20] ALSA: hda/realtek - Fixed ALC256 headphone no sound Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 06/20] ALSA: hda/realtek - FIxed ALC285 " Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 07/20] scsi: lpfc: Fix overflow build issue Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 08/20] pinctrl: at91: make it work with current gpiolib Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 09/20] hwmon: (asus-ec-sensors) remove VRM temp X570-E GAMING Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 10/20] microblaze: don't treat zero reserved memory regions as error Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 11/20] platform/x86: x86-android-tablets: Make Lenovo Yoga Tab 3 X90F DMI match less strict Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 12/20] net: ftgmac100: Ensure tx descriptor updates are visible Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 13/20] LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 14/20] wifi: iwlwifi: lower message level for FW buffer destination Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 15/20] wifi: iwlwifi: mvm: fix iwl_mvm_scan_fits() calculation Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 16/20] wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room() Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 17/20] wifi: iwlwifi: mvm: pause TCM when the firmware is stopped Sasha Levin
2024-09-03 19:23 ` Sasha Levin [this message]
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 19/20] wifi: mac80211: free skb on error path in ieee80211_beacon_get_ap() Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 20/20] wifi: iwlwifi: clear trans->state earlier upon error 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=20240903192425.1107562-18-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=benjamin.berg@intel.com \
--cc=emmanuel.grumbach@intel.com \
--cc=gregory.greenman@intel.com \
--cc=ilan.peer@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 \
/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