From: Goran Sustek <gsustek@gmail.com>
To: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Cc: Jeff Johnson <jjohnson@kernel.org>,
linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH ath-next 1/3] wifi: ath12k: allocate the AFC memory region requested by firmware
Date: Mon, 2 Nov 2026 18:41:36 +0100 [thread overview]
Message-ID: <20261102174136.37406-1-gsustek@gmail.com> (raw)
In-Reply-To: <98f13907-fe0a-4a8c-8ac9-3be40edcaff5@oss.qualcomm.com>
On 11/2/2026 4:06 PM, Rameshkumar Sundaram wrote:
> In that case, shouldn't chunk->size be cleared when no memory is
> allocated, or should the response only contain the chunks that were
> actually allocated and assigned by host ? (see
> ath12k_qmi_assign_target_mem_chunk() which updates ab->qmi.mem_seg_count)
>
> Allocating AFC_REGION_TYPE while AFC itself is not supported by the host
> looks wrong to me.
Agreed, thanks. The comment above the switch already says that the host
does not allocate memory for regions it does not support, and v1 went
against that.
v2 will not allocate the region. It names the type, answers it with
address 0 and size 0, so the firmware no longer holds an AFC region at
bus address 0, and logs this at debug level instead of warning.
I prefer clearing the size over leaving the segment out, for three
reasons:
- The firmware already treats a region with size 0 as not provided, so
the answer has a defined meaning. A response with fewer segments than
requested is not something I could verify for the PCI firmware.
- It stays a local change in the existing switch case.
- Compacting target_mem[] in the PCI path would shift the indices that
ath12k_qmi_alloc_chunk() uses to reuse memory after firmware recovery
(prev_type/prev_size), and the free path walks mem_seg_count. That
needs extra care to avoid stale or doubly freed entries.
Tested with WLAN.WBE.1.6-01243 on two QCN9274 boards: the firmware sends
the memory ready indication right after the response, reaches firmware
ready, and both radios come up and serve clients, with no firmware
crash. The AHB path already drops unknown types instead, so if you want
both paths to behave the same way, I can follow that in the PCI path.
v2 changes only type 10. The default branch for other unsupported types
stays as it is, because this firmware requests no other one.
Goran
next prev parent reply other threads:[~2026-11-02 17:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 22:08 [PATCH ath-next 0/3] wifi: ath12k: accept what newer QCN9274 firmware requests at boot Goran Sustek
2026-10-30 22:08 ` [PATCH ath-next 1/3] wifi: ath12k: allocate the AFC memory region requested by firmware Goran Sustek
2026-11-02 10:36 ` Rameshkumar Sundaram
2026-11-02 17:41 ` Goran Sustek [this message]
2026-10-30 22:08 ` [PATCH ath-next 2/3] wifi: ath12k: skip unknown direct buffer ring module IDs Goran Sustek
2026-10-30 22:08 ` [PATCH ath-next 3/3] wifi: ath12k: name direct buffer ring modules 2 and 3 Goran Sustek
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=20261102174136.37406-1-gsustek@gmail.com \
--to=gsustek@gmail.com \
--cc=ath12k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rameshkumar.sundaram@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®