public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	Miri Korenblit <miriam.rachel.korenblit@intel.com>,
	Johannes Berg <johannes.berg@intel.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.10 20/58] wifi: iwlwifi: mvm: dont wait for tx queues if firmware is dead
Date: Fri, 27 Sep 2024 14:23:22 +0200	[thread overview]
Message-ID: <20240927121719.626420013@linuxfoundation.org> (raw)
In-Reply-To: <20240927121718.789211866@linuxfoundation.org>

6.10-stable review patch.  If anyone has any objections, please let me know.

------------------

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 259afecd1a98d..83551d962a46c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -5819,6 +5819,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,
@@ -5914,8 +5918,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




  parent reply	other threads:[~2024-09-27 12:28 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-27 12:23 [PATCH 6.10 00/58] 6.10.12-rc1 review Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 01/58] ASoC: SOF: mediatek: Add missing board compatible Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 02/58] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 03/58] ASoC: allow module autoloading for table db1200_pids Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 04/58] ASoC: allow module autoloading for table board_ids Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 05/58] ALSA: hda/realtek - Fixed ALC256 headphone no sound Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 06/58] ALSA: hda/realtek - FIxed ALC285 " Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 07/58] scsi: lpfc: Fix overflow build issue Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 08/58] pinctrl: at91: make it work with current gpiolib Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 09/58] hwmon: (asus-ec-sensors) remove VRM temp X570-E GAMING Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 10/58] microblaze: dont treat zero reserved memory regions as error Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 11/58] platform/x86: asus-wmi: Fix spurious rfkill on UX8406MA Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 12/58] platform/x86: x86-android-tablets: Make Lenovo Yoga Tab 3 X90F DMI match less strict Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 13/58] net: ftgmac100: Ensure tx descriptor updates are visible Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 14/58] LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 15/58] LoongArch: KVM: Invalidate guest steal time address on vCPU reset Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 16/58] wifi: iwlwifi: lower message level for FW buffer destination Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 17/58] wifi: iwlwifi: mvm: fix iwl_mvm_scan_fits() calculation Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 18/58] wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room() Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 19/58] wifi: iwlwifi: mvm: pause TCM when the firmware is stopped Greg Kroah-Hartman
2024-09-27 12:23 ` Greg Kroah-Hartman [this message]
2024-09-27 12:23 ` [PATCH 6.10 21/58] wifi: mac80211: free skb on error path in ieee80211_beacon_get_ap() Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 22/58] wifi: iwlwifi: clear trans->state earlier upon error Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 23/58] can: m_can: Limit coalescing to peripheral instances Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 24/58] can: mcp251xfd: mcp251xfd_ring_init(): check TX-coalescing configuration Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 25/58] ASoC: Intel: soc-acpi-cht: Make Lenovo Yoga Tab 3 X90F DMI match less strict Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 26/58] ASoC: intel: fix module autoloading Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 27/58] ASoC: google: " Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 28/58] ASoC: tda7419: " Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 29/58] ASoC: " Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 30/58] ASoC: mediatek: mt8188-mt6359: Modify key Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 31/58] spi: spidev: Add an entry for elgin,jg10309-01 Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 32/58] ASoC: amd: yc: Add a quirk for MSI Bravo 17 (D7VEK) Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 33/58] clk: qcom: gcc-sm8650: Dont use shared clk_ops for QUPs Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 34/58] ALSA: hda: add HDMI codec ID for Intel PTL Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 35/58] drm: komeda: Fix an issue related to normalized zpos Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 36/58] spi: bcm63xx: Enable module autoloading Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 37/58] smb: client: fix hang in wait_for_response() for negproto Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 38/58] platform/x86/amd: pmf: Make ASUS GA403 quirk generic Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 39/58] ice: check for XDP rings instead of bpf program when unconfiguring Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 40/58] x86/hyperv: Set X86_FEATURE_TSC_KNOWN_FREQ when Hyper-V provides frequency Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 41/58] tools: hv: rm .*.cmd when make clean Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 42/58] drm/amd/pm: fix the pp_dpm_pcie issue on smu v14.0.2/3 Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 43/58] spi: spidev: Add missing spi_device_id for jg10309-01 Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 44/58] ocfs2: add bounds checking to ocfs2_xattr_find_entry() Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 45/58] ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry() Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 46/58] drm: Use XArray instead of IDR for minors Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 47/58] accel: " Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 48/58] drm: Expand max DRM device number to full MINORBITS Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 49/58] powercap/intel_rapl: Add support for AMD family 1Ah Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 50/58] powercap/intel_rapl: Fix the energy-pkg event for AMD CPUs Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 51/58] netfilter: nft_socket: make cgroupsv2 matching work with namespaces Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 52/58] netfilter: nft_socket: Fix a NULL vs IS_ERR() bug in nft_socket_cgroup_subtree_level() Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 53/58] Bluetooth: btintel_pcie: Allocate memory for driver private data Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 54/58] nvme-pci: qdepth 1 quirk Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 55/58] can: mcp251xfd: properly indent labels Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 56/58] can: mcp251xfd: move mcp251xfd_timestamp_start()/stop() into mcp251xfd_chip_start/stop() Greg Kroah-Hartman
2024-09-27 12:23 ` [PATCH 6.10 57/58] USB: serial: pl2303: add device id for Macrosilicon MS3020 Greg Kroah-Hartman
2024-09-27 12:24 ` [PATCH 6.10 58/58] USB: usbtmc: prevent kernel-usb-infoleak Greg Kroah-Hartman
2024-09-27 15:51 ` [PATCH 6.10 00/58] 6.10.12-rc1 review Allen
2024-09-27 17:12 ` Peter Schneider
2024-09-27 18:36 ` Jon Hunter
2024-09-27 19:40 ` Florian Fainelli
2024-09-28 12:44 ` Naresh Kamboju
2024-09-28 17:14 ` Shuah Khan
2024-09-29  8:28 ` Ron Economos
2024-09-29 10:55 ` Kexy Biscuit
2024-09-29 11:22 ` Muhammad Usama Anjum
2024-09-30  8:46 ` Pavel Machek
2024-10-01 14:24 ` Guenter Roeck
2024-10-01 14:38   ` Greg Kroah-Hartman

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=20240927121719.626420013@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=patches@lists.linux.dev \
    --cc=sashal@kernel.org \
    --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