From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>,
ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, jjohnson@kernel.org,
quic_kiranv@quicinc.com, baochen.qiang@oss.qualcomm.com,
vasanthakumar.thiagarajan@oss.qualcomm.com
Subject: Re: [PATCH ath-next] wifi: ath12k: add support to load shared firmware on multiPD
Date: Fri, 14 Aug 2026 11:24:44 -0700 [thread overview]
Message-ID: <30a72dbf-2872-489c-94eb-6d68828ec5e6@oss.qualcomm.com> (raw)
In-Reply-To: <20260811054316.518494-1-aaradhana.sahu@oss.qualcomm.com>
On 8/10/2026 10:43 PM, Aaradhana Sahu wrote:
> +static int ath12k_ahb_load_auth_shared_fw(struct ath12k_base *ab,
> + struct ath12k_ahb_rproc_info *rproc_info,
> + const char *fw_name, u32 pasid)
> +{
> + int ret;
> +
> + const struct firmware *fw __free(firmware) = NULL;
> + ret = request_firmware(&fw, fw_name, ab->dev);
> + if (ret) {
> + ath12k_err(ab, "failed to request shared firmware %s: %d\n",
> + fw_name, ret);
> + return ret;
> + }
> +
> + if (!fw->size) {
> + ath12k_err(ab, "Invalid firmware size\n");
> + return -EINVAL;
> + }
> +
> + ath12k_dbg(ab, ATH12K_DBG_AHB, "loading firmware %s, size %zd\n", fw_name,
> + fw->size);
> +
> + ret = qcom_mdt_load(ab->dev, fw, fw_name, pasid, rproc_info->mem_region,
> + rproc_info->mem_phys, rproc_info->mem_size, NULL);
> + if (ret) {
> + ath12k_err(ab, "failed to load RO firmware %s: %d\n", fw_name, ret);
> + return ret;
> + }
> +
> + ret = qcom_pas_auth_and_reset(pasid);
> + if (ret)
> + ath12k_err(ab, "failed to authenticate and boot shared firmware: %d\n",
> + ret);
my review agent says:
qcom_mdt_load() calls qcom_scm_pas_init_image() and qcom_scm_pas_mem_setup()
internally, which register the PASID with TrustZone. If that succeeds but the
subsequent qcom_pas_auth_and_reset() fails, the PASID remains registered in
SCM with no corresponding shutdown. The caller
(ath12k_ahb_load_shared_firmware()) calls ath12k_ahb_put_fw_load_region() on
this error path, but does not call qcom_pas_shutdown(). On the next probe or
reset cycle, qcom_mdt_load() calls qcom_scm_pas_init_image() again on an
already-registered PASID; SCM returns an error and firmware loading is
permanently broken until a full platform reset.
and it suggest calling qcom_pas_shutdown(pasid)
ret = qcom_pas_auth_and_reset(pasid);
if (ret) {
ath12k_err(...);
qcom_pas_shutdown(pasid);
}
return ret;
> + return ret;
> +}
> +
next prev parent reply other threads:[~2026-08-14 18:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 5:43 [PATCH ath-next] wifi: ath12k: add support to load shared firmware on multiPD Aaradhana Sahu
2026-08-11 9:08 ` Vasanthakumar Thiagarajan
2026-08-12 13:57 ` Jeff Johnson
2026-08-12 2:03 ` Baochen Qiang
2026-08-14 18:24 ` Jeff Johnson [this message]
2026-08-17 6:10 ` Aaradhana Sahu
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=30a72dbf-2872-489c-94eb-6d68828ec5e6@oss.qualcomm.com \
--to=jeff.johnson@oss.qualcomm.com \
--cc=aaradhana.sahu@oss.qualcomm.com \
--cc=ath12k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_kiranv@quicinc.com \
--cc=vasanthakumar.thiagarajan@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