[PATCH 1/2] remoteproc: qcom_wcnss: Request the MX and PX regulators on pronto-v1/v2

From: Alexandre Rapaille via B4 Relay

Date: Wed Dec 02 2026 - 08:49:57 EST


From: Alexandre Rapaille <arapaille@xxxxxxxxxxxxxxxxxxxx>

The pronto-v3 check added by commit 3dbc90b9c22e ("remoteproc:
qcom_wcnss: Fix handling the lack of PD regulators in v3") compares the
number of power domain names with num_vregs, which counts only the
non-PD regulators. On pronto-v1/v2 that is 2 >= 1, so the PD regulators
are skipped there too: the driver requests only the first entry,
"vddcx" (a dummy when CX is a power domain), and never votes VDD_MX or
VDD_PX.

Only skip when the vregs list has no PD regulators. Reverting that commit
would bring back the pronto-v3 out-of-bounds read it fixed.

Fixes: 3dbc90b9c22e ("remoteproc: qcom_wcnss: Fix handling the lack of PD regulators in v3")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Alexandre Rapaille <arapaille@xxxxxxxxxxxxxxxxxxxx>
---
drivers/remoteproc/qcom_wcnss.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 02f38fe29f20..e73c4ed0b513 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -445,19 +445,15 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
{
const struct wcnss_vreg_info *info = data->vregs;
struct regulator_bulk_data *bulk;
- size_t i, possible_pds = 0, num_vregs = data->num_vregs;
+ size_t i, num_vregs = data->num_vregs;
int ret;

- for (i = 0; i < WCNSS_MAX_PDS; i++)
- if (data->pd_names[i])
- possible_pds++;
-
/*
* If attaching the power domains suceeded we can skip requesting
* the regulators for the power domains. For old device trees we need to
* reserve extra space to manage them through the regulator interface.
*/
- if (possible_pds >= num_vregs) {
+ if (!data->num_pd_vregs) {
/* Do nothing if vregs do not include PD regulators (pronto-v3) */
} else if (wcnss->num_pds) {
info += wcnss->num_pds;

--
2.43.0