From: Johan Hovold <johan@kernel.org>
To: Miaoqing Pan <quic_miaoqing@quicinc.com>
Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, johan+linaro@kernel.org
Subject: Re: [PATCH v2 ath-next 2/2] wifi: ath11k: fix HTC rx insufficient length
Date: Thu, 13 Mar 2025 17:14:05 +0100 [thread overview]
Message-ID: <Z9METTzUJe9yqVEI@hovoldconsulting.com> (raw)
In-Reply-To: <8ea7fe7c-7b4d-4a6f-ae03-b9ca127c23f8@quicinc.com>
On Thu, Mar 13, 2025 at 09:31:56PM +0800, Miaoqing Pan wrote:
> On 3/13/2025 12:43 AM, Johan Hovold wrote:
> > On Wed, Mar 12, 2025 at 09:11:45AM +0800, Miaoqing Pan wrote:
> >> On 3/11/2025 11:20 PM, Jeff Johnson wrote:
> >>> That didn't answer Johan's first question:
> >>> Are there ever any valid reasons for seeing a zero-length descriptor?
> >>
> >> The events currently observed are all firmware logs. The discarded
> >> packets will not affect normal operation. I will adjust the logging to
> >> debug level.
Have you looked at the device side of things as well? Could it be that
the firmware is doing something wrong when forwarding the logs?
How sure are you that you only see this with firmware logs?
> > I've taken a closer look at the driver and it seems like we're missing a
> > read barrier to make sure that the updated descriptor is not read until
> > after the head pointer.
> >
> > Miaoqing, could you try the below patch with your reproducer and see if
> > it is enough to fix the corruption?
> > + /* Make sure descriptor is read after the head pointer. */
> > + dma_rmb();
> > +
> > *nbytes = ath11k_hal_ce_dst_status_get_length(desc);
> > if (*nbytes == 0) {
> > + WARN_ON_ONCE(1); // FIXME: remove
> > ret = -EIO;
> > goto err;
> > }
>
> This issue can still be reproduced.
>
> [ 3283.687469] WARNING: CPU: 0 PID: 0 at
> /drivers/net/wireless/ath/ath11k/ce.c:405
> ath11k_ce_per_engine_service+0x228/0x3e4 [ath11k]
Thanks for verifying.
Which platform are you testing on and which kernel are you using?
I'm still waiting to hear back from some people testing my patch on the
X13s (sc8280xp).
Johan
next prev parent reply other threads:[~2025-03-13 17:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 1:02 [PATCH v2 ath-next 0/2] wifi: ath11k: fix HTC rx insufficient length Miaoqing Pan
2025-03-10 1:02 ` [PATCH v2 ath-next 1/2] wifi: ath11k: add function to get next srng desc Miaoqing Pan
2025-03-10 1:02 ` [PATCH v2 ath-next 2/2] wifi: ath11k: fix HTC rx insufficient length Miaoqing Pan
2025-03-10 10:09 ` Johan Hovold
2025-03-11 8:29 ` Miaoqing Pan
2025-03-11 15:20 ` Jeff Johnson
2025-03-12 1:11 ` Miaoqing Pan
2025-03-12 16:43 ` Johan Hovold
2025-03-13 1:41 ` Miaoqing Pan
2025-03-13 15:57 ` Johan Hovold
2025-03-14 0:46 ` Miaoqing Pan
2025-03-13 13:31 ` Miaoqing Pan
2025-03-13 16:14 ` Johan Hovold [this message]
2025-03-14 1:01 ` Miaoqing Pan
2025-03-14 8:06 ` Johan Hovold
2025-03-14 8:19 ` Miaoqing Pan
2025-03-17 5:52 ` Miaoqing Pan
2025-03-17 13:04 ` Johan Hovold
2025-03-18 7:53 ` Miaoqing Pan
2025-03-18 17:42 ` Johan Hovold
2025-03-19 6:47 ` Miaoqing Pan
2025-03-21 9:35 ` Johan Hovold
2025-03-25 1:04 ` Miaoqing Pan
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=Z9METTzUJe9yqVEI@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=johan+linaro@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_miaoqing@quicinc.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