From: Kang Yang <kang.yang@oss.qualcomm.com>
To: Jeff Johnson <jjohnson@kernel.org>,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
linux-kernel@vger.kernel.org,
Kang Yang <kang.yang@oss.qualcomm.com>
Subject: [PATCH ath-next v3 08/10] wifi: ath10k: trigger recovery on corrupted HTC bundle lookahead
Date: Thu, 12 Nov 2026 03:26:07 -0800 [thread overview]
Message-ID: <20261112-10k-sdio-crash-v3-8-24f03f300bb2@oss.qualcomm.com> (raw)
In-Reply-To: <20261112-10k-sdio-crash-v3-0-24f03f300bb2@oss.qualcomm.com>
When firmware crashes, the SDIO interrupt handler may read a
corrupted RX lookahead whose header reports more messages than
ar->htc.max_msgs_per_htc_bundle. The driver then prints errors such
as:
HTC bundle length 2322 exceeds maximum 32
failed to allocate a bundle: -12
failed to get pending recv messages: -12
failed to process pending SDIO interrupts: -12
The handler returns -ENOMEM without consuming the mailbox lookahead
or checking the firmware-crash CPU interrupt. The SDIO interrupt
therefore remains asserted and ath10k_sdio_irq_handler() repeatedly
processes the same invalid lookahead.
Stress-test logs show that this interrupt storm can continue for
15 to 20 seconds before the firmware watchdog allows the crash
interrupt to be observed and recovery to start. RX remains stalled
and user traffic times out during this interval.
ath10k_sdio_mbox_rx_alloc() already triggers recovery when the
lookahead payload length exceeds ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH.
A bundle count above max_msgs_per_htc_bundle is the same class of
corrupted lookahead.
Mask the target interrupts immediately when the invalid bundle count
is detected, then start recovery so the HIF is reinitialized instead
of waiting for the firmware watchdog.
Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00288-QCARMSWPZ-1
Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00189
Signed-off-by: Kang Yang <kang.yang@oss.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/sdio.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
index 748ba6749339..fdf19ce4b55b 100644
--- a/drivers/net/wireless/ath/ath10k/sdio.c
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -497,6 +497,8 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar,
return ret;
}
+static int ath10k_sdio_disable_intrs(struct ath10k *ar);
+
static int ath10k_sdio_mbox_alloc_bundle(struct ath10k *ar,
struct ath10k_sdio_rx_data *rx_pkts,
struct ath10k_htc_hdr *htc_hdr,
@@ -513,6 +515,11 @@ static int ath10k_sdio_mbox_alloc_bundle(struct ath10k *ar,
"HTC bundle length %u exceeds maximum %u\n",
le16_to_cpu(htc_hdr->len),
max_msgs);
+ ath10k_core_start_recovery(ar);
+ /* Recovery is a no-op if already pending, so also mask the
+ * target interrupts to stop the IRQ storm.
+ */
+ ath10k_sdio_disable_intrs(ar);
return -ENOMEM;
}
--
2.34.1
next prev parent reply other threads:[~2026-11-12 11:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 11:25 [PATCH ath-next v3 00/10] wifi: ath10k: fix recovery and WEDGED failure handling Kang Yang
2026-11-12 11:26 ` [PATCH ath-next v3 01/10] wifi: ath10k: fix SDIO aux workqueue starvation in recovery detection Kang Yang
2026-11-13 9:24 ` Loic Poulain
2026-11-20 6:42 ` Kang Yang
2026-11-12 11:26 ` [PATCH ath-next v3 02/10] wifi: ath10k: wake blocked waiters when entering WEDGED state Kang Yang
2026-11-12 11:26 ` [PATCH ath-next v3 03/10] wifi: ath10k: also wake remaining blocked waiters Kang Yang
2026-11-12 11:26 ` [PATCH ath-next v3 04/10] wifi: ath10k: bound recovery time before entering WEDGED Kang Yang
2026-11-12 11:26 ` [PATCH ath-next v3 05/10] wifi: ath10k: hard-block the radio when entering WEDGED state Kang Yang
2026-11-12 11:26 ` [PATCH ath-next v3 06/10] wifi: ath10k: remove now-unused driver_recovery completion Kang Yang
2026-11-12 11:26 ` [PATCH ath-next v3 07/10] wifi: ath10k: trigger recovery on PCIe MMIO wake-up failures Kang Yang
2026-11-12 11:26 ` Kang Yang [this message]
2026-11-12 11:26 ` [PATCH ath-next v3 09/10] wifi: ath10k: reject scan requests while the device is not running Kang Yang
2026-11-12 11:26 ` [PATCH ath-next v3 10/10] wifi: ath10k: drop async writes and sleep timer across power cycles Kang Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112-10k-sdio-crash-v3-8-24f03f300bb2@oss.qualcomm.com \
--to=kang.yang@oss.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®