From: Luca Weiss <luca@lucaweiss.eu>
To: federico@izzo.pro
Cc: Srinivas Kandagatla <srini@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH] slimbus: qcom-ngd-ctrl: fix ngd register base address
Date: Fri, 10 Jul 2026 11:40:33 +0200 [thread overview]
Message-ID: <35a7f6d4da307dbd1eb2fffc255e0206@lucaweiss.eu> (raw)
In-Reply-To: <20260709-qcom-ngd-register-base-fix-v1-1-5f7ab48f9209@izzo.pro>
Hi Federico,
On 2026-07-09 19:00, Federico Amedeo Izzo via B4 Relay wrote:
> From: Federico Amedeo Izzo <federico@izzo.pro>
>
> The slimbus controller register base was calculated using the
> controller ID and the register size, producing wrong results for ID >
> 1.
>
> The expression reduces to ngd->base = ctrl->base for controller with ID
> = 1;
> but for ID > 1 the other factors produce a wrong base address.
> This bug caused a crash while trying to bring-up the secondary
> slimbus controller (ID = 3) on oneplus-enchilada with sdm845.
>
> In practice, the correct base address for each slimbus controller can
> be
> obtained from the device-tree, so there is no need for further
> calculations.
>
> This was validated by reading the version register from the WCN3990
> slim
> interface on oneplus-enchilada.
>
> ---
Please remove the ---, otherwise your S-o-b will be dropped when
applying the patch.
Also Fixes: ?
> Signed-off-by: Federico Amedeo Izzo <federico@izzo.pro>
> ---
> drivers/slimbus/qcom-ngd-ctrl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c
> b/drivers/slimbus/qcom-ngd-ctrl.c
> index 80877e951849..91932f8d021b 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -1547,8 +1547,7 @@ static int of_qcom_slim_ngd_register(struct
> device *parent,
> kfree(ngd);
> return ret;
> }
> - ngd->base = ctrl->base + ngd->id * data->offset +
> - (ngd->id - 1) * data->size;
> + ngd->base = ctrl->base + data->offset;
>
> return 0;
> }
>
> ---
> base-commit: b9810cd75b9fb56a3425d391cba3f608502bd474
> change-id: 20260709-qcom-ngd-register-base-fix-a59713a184b8
>
> Best regards,
> --
> Federico Amedeo Izzo <federico@izzo.pro>
prev parent reply other threads:[~2026-07-10 9:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 17:00 [PATCH] slimbus: qcom-ngd-ctrl: fix ngd register base address Federico Amedeo Izzo via B4 Relay
2026-07-10 9:40 ` Luca Weiss [this message]
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=35a7f6d4da307dbd1eb2fffc255e0206@lucaweiss.eu \
--to=luca@lucaweiss.eu \
--cc=federico@izzo.pro \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=srini@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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