From: gregory.greenman@intel.com
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
Johannes Berg <johannes.berg@intel.com>,
Gregory Greenman <gregory.greenman@intel.com>
Subject: [PATCH 08/14] wifi: iwlwifi: pcie: synchronize IRQs before NAPI
Date: Tue, 17 Oct 2023 12:16:43 +0300 [thread overview]
Message-ID: <20231017115047.a0f4104b479a.Id5c50a944f709092aa6256e32d8c63b2b8d8d3ac@changeid> (raw)
In-Reply-To: <20231017091649.65090-1-gregory.greenman@intel.com>
From: Johannes Berg <johannes.berg@intel.com>
When we want to synchronize the NAPI, which was added in
commit 5af2bb3168db ("wifi: iwlwifi: call napi_synchronize()
before freeing rx/tx queues"), we also need to make sure we
can't actually reschedule the NAPI. Yes, this happens while
interrupts are disabled, but interrupts may still be running
or pending. Also call iwl_pcie_synchronize_irqs() to ensure
we won't reschedule the NAPI.
Fixes: 4cf2f5904d97 ("iwlwifi: queue: avoid memory leak in reset flow")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 1 +
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
index 085c4b49be87..c9e5bda8f0b7 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
@@ -161,6 +161,7 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans)
if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) {
IWL_DEBUG_INFO(trans,
"DEVICE_ENABLED bit was set and is now cleared\n");
+ iwl_pcie_synchronize_irqs(trans);
iwl_pcie_rx_napi_sync(trans);
iwl_txq_gen2_tx_free(trans);
iwl_pcie_rx_stop(trans);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index 385e152f04fe..a468e5efeecd 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1264,6 +1264,7 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans)
if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) {
IWL_DEBUG_INFO(trans,
"DEVICE_ENABLED bit was set and is now cleared\n");
+ iwl_pcie_synchronize_irqs(trans);
iwl_pcie_rx_napi_sync(trans);
iwl_pcie_tx_stop(trans);
iwl_pcie_rx_stop(trans);
--
2.38.1
next prev parent reply other threads:[~2023-10-17 9:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 9:16 [PATCH 00/14] wifi: iwlwifi: updates - 2023-10-17 gregory.greenman
2023-10-17 9:16 ` [PATCH 01/14] wifi: iwlwifi: make time_events MLO aware gregory.greenman
2023-10-17 9:16 ` [PATCH 02/14] wifi: iwlwifi: support link_id in SESSION_PROTECTION cmd gregory.greenman
2023-10-17 9:16 ` [PATCH 03/14] wifi: iwlwifi: support link id in SESSION_PROTECTION_NOTIF gregory.greenman
2023-10-17 9:16 ` [PATCH 04/14] wifi: iwlwifi: api: fix center_freq label in PHY diagram gregory.greenman
2023-10-17 9:16 ` [PATCH 05/14] wifi: iwlwifi: mvm: remove set_tim callback for MLD ops gregory.greenman
2023-10-17 9:16 ` [PATCH 06/14] wifi: iwlwifi: mvm: fix netif csum flags gregory.greenman
2023-10-17 9:16 ` [PATCH 07/14] wifi: iwlwifi: add support for SNPS DPHYIP region type gregory.greenman
2023-10-17 9:16 ` gregory.greenman [this message]
2023-10-17 9:16 ` [PATCH 09/14] wifi: iwlwifi: mvm: fix size check for fw_link_id gregory.greenman
2023-10-17 9:16 ` [PATCH 10/14] wifi: iwlwifi: mvm: Return success if link could not be removed gregory.greenman
2023-10-17 9:16 ` [PATCH 11/14] wifi: iwlwifi: disable multi rx queue for 9000 gregory.greenman
2023-10-17 9:16 ` [PATCH 12/14] wifi: iwlwifi: mvm: simplify the reorder buffer gregory.greenman
2023-10-17 9:16 ` [PATCH 13/14] wifi: iwlwifi: mvm: update IGTK in mvmvif upon D3 resume gregory.greenman
2023-10-17 9:16 ` [PATCH 14/14] wifi: iwlwifi: mvm: fix regdb initialization gregory.greenman
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=20231017115047.a0f4104b479a.Id5c50a944f709092aa6256e32d8c63b2b8d8d3ac@changeid \
--to=gregory.greenman@intel.com \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.