[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240709073132.9168-1-johan+linaro@kernel.org>
Date: Tue, 9 Jul 2024 09:31:32 +0200
From: Johan Hovold <johan+linaro@...nel.org>
To: Kalle Valo <kvalo@...nel.org>,
Jeff Johnson <jjohnson@...nel.org>
Cc: Bhagavathi Perumal S <quic_bperumal@...cinc.com>,
Vasanthakumar Thiagarajan <quic_vthiagar@...cinc.com>,
Karthikeyan Periyasamy <quic_periyasa@...cinc.com>,
Wen Gong <quic_wgong@...cinc.com>,
ath12k@...ts.infradead.org,
linux-wireless@...r.kernel.org,
linux-kernel@...r.kernel.org,
Johan Hovold <johan+linaro@...nel.org>,
stable@...r.kernel.org
Subject: [PATCH] wifi: ath12k: fix soft lockup on suspend
The ext interrupts are enabled when the firmware has been started, but
this may never happen, for example, if the board configuration file is
missing.
When the system is later suspended, the driver unconditionally tries to
disable interrupts, which results in an irq disable imbalance and causes
the driver to spin indefinitely in napi_synchronize().
Make sure that the interrupts have been enabled before attempting to
disable them.
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Cc: stable@...r.kernel.org # 6.3
Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
---
drivers/net/wireless/ath/ath12k/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
index 16af046c33d9..55fde0d33183 100644
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -472,7 +472,8 @@ static void __ath12k_pci_ext_irq_disable(struct ath12k_base *ab)
{
int i;
- clear_bit(ATH12K_FLAG_EXT_IRQ_ENABLED, &ab->dev_flags);
+ if (!test_and_clear_bit(ATH12K_FLAG_EXT_IRQ_ENABLED, &ab->dev_flags))
+ return;
for (i = 0; i < ATH12K_EXT_IRQ_GRP_NUM_MAX; i++) {
struct ath12k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
--
2.44.1
Powered by blists - more mailing lists