[PATCH] wifi: ath10k: Fix unbalanced IRQ enabling
Jeff Johnson
jeff.johnson at oss.qualcomm.com
Thu May 22 08:33:20 PDT 2025
On 5/22/2025 5:09 AM, Loic Poulain wrote:
> When the firmware goes down, both RECOVERY and CRASH_FLUSH flags are set,
> triggering a full recovery sequence once the firmware is back up. This
> includes stopping and restarting the SNOC interface.
>
> However, this sequence leads to an Unbalanced IRQ warning:
>
> ------------[ cut here ]------------
> Unbalanced enable for IRQ 112
> WARNING: CPU: 2 PID: 120 at kernel/irq/manage.c:792 __enable_irq+0x4c/0x7c
> CPU: 2 UID: 0 PID: 120 Comm: kworker/2:4 Not tainted [...] #234 PREEMPT
> Hardware name: Qualcomm Technologies, Inc. Robotics RB1 (DT)
> Workqueue: events_freezable ieee80211_restart_work
> pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : __enable_irq+0x4c/0x7c
> lr : __enable_irq+0x4c/0x7c
> sp : ffff800081b3bab0
> [...]
> Call trace:
> __enable_irq+0x4c/0x7c (P)
> enable_irq+0x48/0x9c
> ath10k_snoc_hif_start+0x6c/0x13c
> ath10k_core_start+0x360/0x1344
> ath10k_start+0x100/0x8fc
> drv_start+0x34/0x58
> ieee80211_reconfig+0xf4/0xfc0
> ieee80211_restart_work+0x110/0x17c
> process_one_work+0x150/0x294
> worker_thread+0x2dc/0x3dc
> kthread+0x130/0x204
> ret_from_fork+0x10/0x20
> ---
this causes git to chop the description at this point, which also chops the
tags, so remove it.
>
> This can be reproduced by restarting rmtfs or triggering remoteproc restart
> via sysfs.
>
> The root cause is that IRQs are not disabled during SNOC stop in recovery
> scenarios, but are unconditionally re-enabled during SNOC start, leading to
> an imbalance.
>
> Fix this by skipping IRQ re-enablement in `ath10k_snoc_hif_start()` if a
> firmware recovery is in progress, restoring IRQ state symmetry.
>
> Fixes: 0e622f67e041 ("ath10k: add support for WCN3990 firmware crash recovery")
> Signed-off-by: Loic Poulain <loic.poulain at oss.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath10k/snoc.c | 3 ++-
My Qualcomm copyright checker flags:
* drivers/net/wireless/ath/ath10k/snoc.c no QuIC copyright
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
> index 866bad2db334..e15e1ab30458 100644
> --- a/drivers/net/wireless/ath/ath10k/snoc.c
> +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> @@ -937,7 +937,8 @@ static int ath10k_snoc_hif_start(struct ath10k *ar)
>
> dev_set_threaded(ar->napi_dev, true);
> ath10k_core_napi_enable(ar);
> - ath10k_snoc_irq_enable(ar);
> + if (!test_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags))
> + ath10k_snoc_irq_enable(ar);
> ath10k_snoc_rx_post(ar);
>
> clear_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags);
More information about the ath10k
mailing list