From: Johan Hovold <johan@kernel.org>
To: Jeff Johnson <jjohnson@kernel.org>
Cc: Miaoqing Pan <quic_miaoqing@quicinc.com>,
Steev Klimaszewski <steev@kali.org>,
Clayton Craft <clayton@craftyguy.net>,
Jens Glathe <jens.glathe@oldschoolsolutions.biz>,
ath11k@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] wifi: ath11k: fix ring-buffer corruption
Date: Tue, 6 May 2025 17:47:53 +0200 [thread overview]
Message-ID: <aBovKWIyPRWG-DSR@hovoldconsulting.com> (raw)
In-Reply-To: <20250321094916.19098-1-johan+linaro@kernel.org>
Hi Jeff,
On Fri, Mar 21, 2025 at 10:49:16AM +0100, Johan Hovold wrote:
> Users of the Lenovo ThinkPad X13s have reported that Wi-Fi sometimes
> breaks and the log fills up with errors like:
>
> ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1484, expected 1492
> ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1460, expected 1484
>
> which based on a quick look at the driver seemed to indicate some kind
> of ring-buffer corruption.
>
> Miaoqing Pan tracked it down to the host seeing the updated destination
> ring head pointer before the updated descriptor, and the error handling
> for that in turn leaves the ring buffer in an inconsistent state.
>
> Add the missing memory barrier to make sure that the descriptor is read
> after the head pointer to address the root cause of the corruption while
> fixing up the error handling in case there are ever any (ordering) bugs
> on the device side.
>
> Note that the READ_ONCE() are only needed to avoid compiler mischief in
> case the ring-buffer helpers are ever inlined.
>
> Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
>
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218623
> Link: https://lore.kernel.org/20250310010217.3845141-3-quic_miaoqing@quicinc.com
> Cc: Miaoqing Pan <quic_miaoqing@quicinc.com>
> Cc: stable@vger.kernel.org # 5.6
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
This patch fixes a long-standing issue that is hurting user of machines
like the X13s, but as far as I can tell it has not been picked up yet
(perhaps due to the temporary MAINTAINERS glitch that caused the
wireless list not to be CCed?).
Would be good to get this fixed in 6.15 and backported to stable.
The following related patches are also not yet in linux-next:
https://lore.kernel.org/lkml/20250321145302.4775-1-johan+linaro@kernel.org/
https://lore.kernel.org/lkml/20250321095219.19369-1-johan+linaro@kernel.org/
Note that I still intend to sending follow-on fixes for the other
missing barriers, but I'm a bit short on time at the moment.
Johan
next prev parent reply other threads:[~2025-05-06 20:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 9:49 [PATCH] wifi: ath11k: fix ring-buffer corruption Johan Hovold
2025-03-21 16:07 ` Clayton Craft
2025-03-21 19:27 ` Jens Glathe
2025-03-22 20:29 ` Steev Klimaszewski
2025-05-06 15:47 ` Johan Hovold [this message]
2025-05-07 0:01 ` Miaoqing Pan
2025-05-16 18:34 ` Jeff Johnson
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=aBovKWIyPRWG-DSR@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=clayton@craftyguy.net \
--cc=jens.glathe@oldschoolsolutions.biz \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_miaoqing@quicinc.com \
--cc=stable@vger.kernel.org \
--cc=steev@kali.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.