* [PATCH ath-next v2 1/2] wifi: ath11k: implement CE interrupt enable/disable for AHB
2026-07-26 22:19 [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB Julius Bairaktaris
@ 2026-07-26 22:19 ` Julius Bairaktaris
2026-07-26 22:19 ` [PATCH ath-next v2 2/2] wifi: ath11k: disable interrupts during firmware crash recovery Julius Bairaktaris
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Julius Bairaktaris @ 2026-07-26 22:19 UTC (permalink / raw)
To: jjohnson
Cc: ath11k, linux-wireless, linux-kernel, baochen.qiang,
vasanthakumar.thiagarajan, rameshkumar.sundaram
ath11k_core_reset() calls ath11k_hif_ce_irq_disable() right before it
powers the target down, but ath11k_ahb_hif_ops_ipq8074 never set the
ce_irq_enable/ce_irq_disable pair, and ath11k_hif_ce_irq_disable() does
nothing when the op is NULL. On AHB the copy engine interrupts and their
tasklets therefore stay live across rproc_shutdown(), where the register
space they touch is no longer accessible.
Wire the ops up. The sequence is the one ath11k_ahb_stop() already runs,
factored into a helper and reused, so behaviour on the stop path is
unchanged. wcn6750 is not affected: it uses the pcic ops, which
implement the pair already.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
---
drivers/net/wireless/ath/ath11k/ahb.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index f566d699d074..72da6919c277 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -391,12 +391,17 @@ static void ath11k_ahb_ext_irq_disable(struct ath11k_base *ab)
ath11k_ahb_sync_ext_irqs(ab);
}
-static void ath11k_ahb_stop(struct ath11k_base *ab)
+static void ath11k_ahb_ce_irq_disable_sync(struct ath11k_base *ab)
{
if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
ath11k_ahb_ce_irqs_disable(ab);
ath11k_ahb_sync_ce_irqs(ab);
ath11k_ahb_kill_tasklets(ab);
+}
+
+static void ath11k_ahb_stop(struct ath11k_base *ab)
+{
+ ath11k_ahb_ce_irq_disable_sync(ab);
timer_delete_sync(&ab->rx_replenish_retry);
ath11k_ce_cleanup_pipes(ab);
}
@@ -773,6 +778,8 @@ static const struct ath11k_hif_ops ath11k_ahb_hif_ops_ipq8074 = {
.map_service_to_pipe = ath11k_ahb_map_service_to_pipe,
.power_down = ath11k_ahb_power_down,
.power_up = ath11k_ahb_power_up,
+ .ce_irq_enable = ath11k_ahb_ce_irqs_enable,
+ .ce_irq_disable = ath11k_ahb_ce_irq_disable_sync,
};
static const struct ath11k_hif_ops ath11k_ahb_hif_ops_wcn6750 = {
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH ath-next v2 2/2] wifi: ath11k: disable interrupts during firmware crash recovery
2026-07-26 22:19 [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB Julius Bairaktaris
2026-07-26 22:19 ` [PATCH ath-next v2 1/2] wifi: ath11k: implement CE interrupt enable/disable for AHB Julius Bairaktaris
@ 2026-07-26 22:19 ` Julius Bairaktaris
2026-07-31 3:07 ` [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB Baochen Qiang
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Julius Bairaktaris @ 2026-07-26 22:19 UTC (permalink / raw)
To: jjohnson
Cc: ath11k, linux-wireless, linux-kernel, baochen.qiang,
vasanthakumar.thiagarajan, rameshkumar.sundaram
On IPQ8074 a firmware assert reboots the SoC:
Unable to handle kernel read from unreadable memory at virtual address 0
pc : ath11k_hal_srng_access_begin+0xc/0x60 [ath11k]
lr : ath11k_dp_rx_process_mon_status+0x15c/0xd84 [ath11k]
Call trace:
ath11k_hal_srng_access_begin+0xc/0x60 [ath11k]
ath11k_dp_rx_process_mon_rings+0xa0/0x5d4 [ath11k]
ath11k_dp_service_srng+0x1f4/0x348 [ath11k]
ath11k_ahb_ext_grp_napi_poll+0x34/0xd4 [ath11k_ahb]
__napi_poll+0x38/0x188
net_rx_action+0x120/0x2c0
ath11k_core_reconfigure_on_crash() tears the data path down with
ath11k_dp_pdev_free(), ath11k_dp_free() and ath11k_hal_srng_clear(),
which memsets the ring list. The DP NAPI is still running while that
happens, so it services a ring whose address pointer has just been
cleared.
That function used to disable the interrupts first, until
commit d455e805de70 ("wifi: ath11k: rearrange IRQ enable/disable in reset path")
moved the disable into ath11k_core_reset(). reset_work is only queued
from mhi.c and from the debugfs hw-restart handler, so AHB parts never
run it on a real firmware crash. Their recovery goes QMI server exit ->
restart_work -> ath11k_core_reconfigure_on_crash() ->
ath11k_core_qmi_firmware_ready(), and nothing disables the interrupts
anywhere along it.
Disable them again on the crash path. The reset path has already done
so by the time it gets here, hence the ab->is_reset check.
This is also why the debugfs hw-restart trigger never showed the
problem: it goes through ath11k_core_reset(), the one path that still
had the disable.
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.12-01460-QCAHKSWPL_SILICONZ-1
Fixes: d455e805de70 ("wifi: ath11k: rearrange IRQ enable/disable in reset path")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
---
drivers/net/wireless/ath/ath11k/core.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 8039124e7832..d2ed6a0ea7e3 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -2334,6 +2334,16 @@ static int ath11k_core_reconfigure_on_crash(struct ath11k_base *ab)
mutex_lock(&ab->core_lock);
ath11k_thermal_unregister(ab);
+
+ /*
+ * ath11k_core_reset() already disabled the interrupts on the reset
+ * path; only the firmware crash path reaches here with them live.
+ */
+ if (!ab->is_reset) {
+ ath11k_hif_irq_disable(ab);
+ ath11k_hif_ce_irq_disable(ab);
+ }
+
ath11k_dp_pdev_free(ab);
ath11k_cfr_deinit(ab);
ath11k_spectral_deinit(ab);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB
2026-07-26 22:19 [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB Julius Bairaktaris
2026-07-26 22:19 ` [PATCH ath-next v2 1/2] wifi: ath11k: implement CE interrupt enable/disable for AHB Julius Bairaktaris
2026-07-26 22:19 ` [PATCH ath-next v2 2/2] wifi: ath11k: disable interrupts during firmware crash recovery Julius Bairaktaris
@ 2026-07-31 3:07 ` Baochen Qiang
2026-08-05 10:48 ` Julius Bairaktaris
2026-08-05 11:13 ` Rameshkumar Sundaram
4 siblings, 0 replies; 6+ messages in thread
From: Baochen Qiang @ 2026-07-31 3:07 UTC (permalink / raw)
To: Julius Bairaktaris, jjohnson
Cc: ath11k, linux-wireless, linux-kernel, vasanthakumar.thiagarajan,
rameshkumar.sundaram
On 7/27/2026 6:19 AM, Julius Bairaktaris wrote:
> On IPQ8074 every firmware assert takes the whole SoC down. The DP NAPI
> keeps polling while ath11k_core_reconfigure_on_crash() frees the data
> path underneath it, and dereferences a ring the teardown has already
> cleared.
>
> The interrupts used to be disabled at the top of that function.
> commit d455e805de70 ("wifi: ath11k: rearrange IRQ enable/disable in reset path")
> moved the disable into ath11k_core_reset(), which AHB parts never reach
> on a real firmware crash: reset_work is queued only from mhi.c and from
> the debugfs hw-restart handler. Patch 2 puts the disable back on the
> crash path. Patch 1 is a prerequisite - the CE half of the quiesce is a
> no-op on AHB today because the bus never implemented the hif ops.
>
> Reproduced and fixed on a Xiaomi AX3600 (IPQ8074 hw2.0), with no
> out-of-tree modules loaded, using the debugfs simulate_fw_crash
> 'assert' trigger:
>
> before: 2/2 asserts panic in ath11k_dp_rx_process_mon_status() and
> reboot the SoC
> after: 3/3 asserts recover, 5 firmware boots across a single 397 s
> uptime, no panics, both radios stay up
>
> Note the debugfs 'hw-restart' trigger does not reproduce this, since it
> goes through ath11k_core_reset() - the one path that still disables the
> interrupts. Only a real firmware assert does.
>
> Patch 1 is by inspection: it makes ath11k_hif_ce_irq_disable() take
> effect on AHB, which also fixes the existing call in
> ath11k_core_reset(). I have not managed to trigger a CE-side crash on
> its own, so if you would rather see that split out or dropped, say so.
>
> Changes in v2 (no functional change, review comments from Jeff on 2/2):
> - separate the ath-specific Tested-on tag from the upstream tags with a
> blank line
> - use the standard kernel block comment style, with /* on its own line
>
> v1: https://lore.kernel.org/ath11k/20260725141757.1316877-1-julius@bairaktaris.de/
>
> Julius Bairaktaris (2):
> wifi: ath11k: implement CE interrupt enable/disable for AHB
> wifi: ath11k: disable interrupts during firmware crash recovery
>
> drivers/net/wireless/ath/ath11k/ahb.c | 9 ++++++++-
> drivers/net/wireless/ath/ath11k/core.c | 10 ++++++++++
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB
2026-07-26 22:19 [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB Julius Bairaktaris
` (2 preceding siblings ...)
2026-07-31 3:07 ` [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB Baochen Qiang
@ 2026-08-05 10:48 ` Julius Bairaktaris
2026-08-05 11:13 ` Rameshkumar Sundaram
4 siblings, 0 replies; 6+ messages in thread
From: Julius Bairaktaris @ 2026-08-05 10:48 UTC (permalink / raw)
To: jjohnson
Cc: ath11k, linux-wireless, linux-kernel, Baochen Qiang,
Vasanthakumar Thiagarajan, Rameshkumar Sundaram
Ping, and some extra data since v1 only had my own bring-up tree behind it.
I have now reproduced this on a stock ath11k with no out-of-tree modules
loaded at all, on an otherwise unmodified OpenWrt mac80211 backports
6.18.39 build for the Xiaomi AX3600 (IPQ8074 hw2.0), firmware
WLAN.HK.2.12-01460-QCAHKSWPL_SILICONZ-1:
# grep -c ath11k_nss /proc/kallsyms
0
# lsmod | grep -c qca
0
Driving the debugfs simulate_fw_crash 'assert' trigger, panic captured
via ramoops:
without this series: 1 assert -> panic, SoC reboot
with this series: 5 asserts -> 5 recoveries, boot_id unchanged,
both radios back up
The panic is the one from the cover letter, verbatim:
Unable to handle kernel read from unreadable memory at virtual address 0
pc : ath11k_hal_srng_access_begin+0xc/0x60 [ath11k]
lr : ath11k_dp_rx_process_mon_status+0x15c/0xd84 [ath11k]
Call trace:
ath11k_hal_srng_access_begin+0xc/0x60 [ath11k] (P)
ath11k_dp_rx_process_mon_rings+0xa0/0x5d4 [ath11k]
ath11k_dp_service_srng+0x1f4/0x348 [ath11k]
ath11k_ahb_ext_grp_napi_poll+0x34/0xd4 [ath11k_ahb]
So the AHB crash path really does reach ath11k_core_reconfigure_on_crash()
with the interrupts live on a plain upstream driver, not only on mine.
Two things I found while doing that run, both separate from this series
and neither ready to send:
- the recovery leaves a list_del() warning from finish_wait() in
ath11k_wmi_cmd_send(), once per recovery. ath11k_wmi_pdev_attach()
re-runs init_waitqueue_head() on tx_ce_desc_wq on every recovery,
under a task that is still queued on it.
- once ath11k_core_reconfigure_on_crash() takes its err_hal_srng_deinit
path, nothing calls ath11k_hal_srng_init() again, so srng_config stays
freed and every later restart faults. A recovery that fails once looks
unrecoverable by construction.
I will send those separately once I have them properly narrowed; flagging
them here only in case they are already known.
Thanks,
Julius
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB
2026-07-26 22:19 [PATCH ath-next v2 0/2] wifi: ath11k: fix SoC reboot on firmware crash on AHB Julius Bairaktaris
` (3 preceding siblings ...)
2026-08-05 10:48 ` Julius Bairaktaris
@ 2026-08-05 11:13 ` Rameshkumar Sundaram
4 siblings, 0 replies; 6+ messages in thread
From: Rameshkumar Sundaram @ 2026-08-05 11:13 UTC (permalink / raw)
To: Julius Bairaktaris, jjohnson
Cc: ath11k, linux-wireless, linux-kernel, baochen.qiang,
vasanthakumar.thiagarajan
On 7/27/2026 3:49 AM, Julius Bairaktaris wrote:
> On IPQ8074 every firmware assert takes the whole SoC down. The DP NAPI
> keeps polling while ath11k_core_reconfigure_on_crash() frees the data
> path underneath it, and dereferences a ring the teardown has already
> cleared.
>
> The interrupts used to be disabled at the top of that function.
> commit d455e805de70 ("wifi: ath11k: rearrange IRQ enable/disable in reset path")
> moved the disable into ath11k_core_reset(), which AHB parts never reach
> on a real firmware crash: reset_work is queued only from mhi.c and from
> the debugfs hw-restart handler. Patch 2 puts the disable back on the
> crash path. Patch 1 is a prerequisite - the CE half of the quiesce is a
> no-op on AHB today because the bus never implemented the hif ops.
>
> Reproduced and fixed on a Xiaomi AX3600 (IPQ8074 hw2.0), with no
> out-of-tree modules loaded, using the debugfs simulate_fw_crash
> 'assert' trigger:
>
> before: 2/2 asserts panic in ath11k_dp_rx_process_mon_status() and
> reboot the SoC
> after: 3/3 asserts recover, 5 firmware boots across a single 397 s
> uptime, no panics, both radios stay up
>
> Note the debugfs 'hw-restart' trigger does not reproduce this, since it
> goes through ath11k_core_reset() - the one path that still disables the
> interrupts. Only a real firmware assert does.
>
> Patch 1 is by inspection: it makes ath11k_hif_ce_irq_disable() take
> effect on AHB, which also fixes the existing call in
> ath11k_core_reset(). I have not managed to trigger a CE-side crash on
> its own, so if you would rather see that split out or dropped, say so.
>
> Changes in v2 (no functional change, review comments from Jeff on 2/2):
> - separate the ath-specific Tested-on tag from the upstream tags with a
> blank line
> - use the standard kernel block comment style, with /* on its own line
>
> v1: https://lore.kernel.org/ath11k/20260725141757.1316877-1-julius@bairaktaris.de/
>
> Julius Bairaktaris (2):
> wifi: ath11k: implement CE interrupt enable/disable for AHB
> wifi: ath11k: disable interrupts during firmware crash recovery
>
> drivers/net/wireless/ath/ath11k/ahb.c | 9 ++++++++-
> drivers/net/wireless/ath/ath11k/core.c | 10 ++++++++++
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread