linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: ath12k: fix soft lockup on suspend
@ 2024-07-09  7:31 Johan Hovold
  2024-07-09 14:17 ` Jeff Johnson
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2024-07-09  7:31 UTC (permalink / raw)
  To: Kalle Valo, Jeff Johnson
  Cc: Bhagavathi Perumal S, Vasanthakumar Thiagarajan,
	Karthikeyan Periyasamy, Wen Gong, ath12k, linux-wireless,
	linux-kernel, Johan Hovold, stable

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@vger.kernel.org	# 6.3
Signed-off-by: Johan Hovold <johan+linaro@kernel.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] wifi: ath12k: fix soft lockup on suspend
  2024-07-09  7:31 [PATCH] wifi: ath12k: fix soft lockup on suspend Johan Hovold
@ 2024-07-09 14:17 ` Jeff Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Johnson @ 2024-07-09 14:17 UTC (permalink / raw)
  To: Johan Hovold, Kalle Valo, Jeff Johnson
  Cc: Bhagavathi Perumal S, Vasanthakumar Thiagarajan,
	Karthikeyan Periyasamy, Wen Gong, ath12k, linux-wireless,
	linux-kernel, stable

On 7/9/2024 12:31 AM, Johan Hovold wrote:
> 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@vger.kernel.org	# 6.3
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-09 14:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09  7:31 [PATCH] wifi: ath12k: fix soft lockup on suspend Johan Hovold
2024-07-09 14:17 ` Jeff Johnson

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).