]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath12k: fix soft lockup on suspend
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 9 Jul 2024 07:31:32 +0000 (09:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Aug 2024 10:58:01 +0000 (12:58 +0200)
commit a47f3320bb4ba6714abe8dddb36399367b491358 upstream.

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>
Link: https://patch.msgid.link/20240709073132.9168-1-johan+linaro@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath12k/pci.c

index 16af046c33d9eeed6ab9e1d1e89fa6e50cee0e54..55fde0d33183c175e6ef84f76e302616248f2064 100644 (file)
@@ -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];