* [PATCH 0/2] Fix fallback qcom,ipc parse
@ 2025-04-21 2:04 Barnabás Czémán
2025-04-21 2:04 ` [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to " Barnabás Czémán
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Barnabás Czémán @ 2025-04-21 2:04 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Tudor Ambarus, Jassi Brar,
Konrad Dybcio
Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Luca Weiss,
Barnabás Czémán
mbox_request_channel() returning value was changed in case of error.
It uses returning value of of_parse_phandle_with_args().
It is returning with -ENOENT instead of -ENODEV when no mboxes property
exists.
ENODEV was checked before fallback to parse qcom,ipc property.
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
Barnabás Czémán (2):
rpmsg: qcom_smd: Fix fallback to qcom,ipc parse
soc: qcom: smp2p: Fix fallback to qcom,ipc parse
drivers/rpmsg/qcom_smd.c | 2 +-
drivers/soc/qcom/smp2p.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: bc8aa6cdadcc00862f2b5720e5de2e17f696a081
change-id: 20250421-fix-qcom-smd-76f7c414a11a
Best regards,
--
Barnabás Czémán <barnabas.czeman@mainlining.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to qcom,ipc parse
2025-04-21 2:04 [PATCH 0/2] Fix fallback qcom,ipc parse Barnabás Czémán
@ 2025-04-21 2:04 ` Barnabás Czémán
2025-04-21 10:38 ` Dmitry Baryshkov
2025-04-21 2:04 ` [PATCH 2/2] soc: qcom: smp2p: " Barnabás Czémán
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Barnabás Czémán @ 2025-04-21 2:04 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Tudor Ambarus, Jassi Brar,
Konrad Dybcio
Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Luca Weiss,
Barnabás Czémán
mbox_request_channel() returning value was changed in case of error.
It uses returning value of of_parse_phandle_with_args().
It is returning with -ENOENT instead of -ENODEV when no mboxes property
exists.
Fixes: 24fdd5074b20 ("mailbox: use error ret code of of_parse_phandle_with_args()")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
drivers/rpmsg/qcom_smd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 40d386809d6b78e209861c23d934e1b9fd743606..e552a9af578e48cfd854a228a4d91e4fa04bf29d 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -1368,7 +1368,7 @@ static int qcom_smd_parse_edge(struct device *dev,
edge->mbox_client.knows_txdone = true;
edge->mbox_chan = mbox_request_channel(&edge->mbox_client, 0);
if (IS_ERR(edge->mbox_chan)) {
- if (PTR_ERR(edge->mbox_chan) != -ENODEV) {
+ if (PTR_ERR(edge->mbox_chan) != -ENOENT) {
ret = PTR_ERR(edge->mbox_chan);
goto put_node;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] soc: qcom: smp2p: Fix fallback to qcom,ipc parse
2025-04-21 2:04 [PATCH 0/2] Fix fallback qcom,ipc parse Barnabás Czémán
2025-04-21 2:04 ` [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to " Barnabás Czémán
@ 2025-04-21 2:04 ` Barnabás Czémán
2025-04-22 8:21 ` [PATCH 0/2] Fix fallback " Stephan Gerhold
2025-05-09 22:13 ` (subset) " Bjorn Andersson
3 siblings, 0 replies; 9+ messages in thread
From: Barnabás Czémán @ 2025-04-21 2:04 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Tudor Ambarus, Jassi Brar,
Konrad Dybcio
Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Luca Weiss,
Barnabás Czémán
mbox_request_channel() returning value was changed in case of error.
It uses returning value of of_parse_phandle_with_args().
It is returning with -ENOENT instead of -ENODEV when no mboxes property
exists.
Fixes: 24fdd5074b20 ("mailbox: use error ret code of of_parse_phandle_with_args()")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
drivers/soc/qcom/smp2p.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
index a3e88ced328a91f1eb9dbaaaeb12fc901838bdaa..c9199d6fbe26ecc5ce941cfd608ebf1381be0935 100644
--- a/drivers/soc/qcom/smp2p.c
+++ b/drivers/soc/qcom/smp2p.c
@@ -575,7 +575,7 @@ static int qcom_smp2p_probe(struct platform_device *pdev)
smp2p->mbox_client.knows_txdone = true;
smp2p->mbox_chan = mbox_request_channel(&smp2p->mbox_client, 0);
if (IS_ERR(smp2p->mbox_chan)) {
- if (PTR_ERR(smp2p->mbox_chan) != -ENODEV)
+ if (PTR_ERR(smp2p->mbox_chan) != -ENOENT)
return PTR_ERR(smp2p->mbox_chan);
smp2p->mbox_chan = NULL;
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to qcom,ipc parse
2025-04-21 2:04 ` [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to " Barnabás Czémán
@ 2025-04-21 10:38 ` Dmitry Baryshkov
2025-04-21 11:40 ` barnabas.czeman
0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Baryshkov @ 2025-04-21 10:38 UTC (permalink / raw)
To: Barnabás Czémán
Cc: Bjorn Andersson, Mathieu Poirier, Tudor Ambarus, Jassi Brar,
Konrad Dybcio, linux-arm-msm, linux-remoteproc, linux-kernel,
Luca Weiss
On Mon, Apr 21, 2025 at 04:04:16AM +0200, Barnabás Czémán wrote:
> mbox_request_channel() returning value was changed in case of error.
> It uses returning value of of_parse_phandle_with_args().
> It is returning with -ENOENT instead of -ENODEV when no mboxes property
> exists.
Why? What is the rationale?
>
> Fixes: 24fdd5074b20 ("mailbox: use error ret code of of_parse_phandle_with_args()")
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
> drivers/rpmsg/qcom_smd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
> index 40d386809d6b78e209861c23d934e1b9fd743606..e552a9af578e48cfd854a228a4d91e4fa04bf29d 100644
> --- a/drivers/rpmsg/qcom_smd.c
> +++ b/drivers/rpmsg/qcom_smd.c
> @@ -1368,7 +1368,7 @@ static int qcom_smd_parse_edge(struct device *dev,
> edge->mbox_client.knows_txdone = true;
> edge->mbox_chan = mbox_request_channel(&edge->mbox_client, 0);
> if (IS_ERR(edge->mbox_chan)) {
> - if (PTR_ERR(edge->mbox_chan) != -ENODEV) {
> + if (PTR_ERR(edge->mbox_chan) != -ENOENT) {
> ret = PTR_ERR(edge->mbox_chan);
> goto put_node;
> }
>
> --
> 2.49.0
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to qcom,ipc parse
2025-04-21 10:38 ` Dmitry Baryshkov
@ 2025-04-21 11:40 ` barnabas.czeman
2025-04-24 11:16 ` Dmitry Baryshkov
0 siblings, 1 reply; 9+ messages in thread
From: barnabas.czeman @ 2025-04-21 11:40 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bjorn Andersson, Mathieu Poirier, Tudor Ambarus, Jassi Brar,
Konrad Dybcio, linux-arm-msm, linux-remoteproc, linux-kernel,
Luca Weiss
On 2025-04-21 12:38, Dmitry Baryshkov wrote:
> On Mon, Apr 21, 2025 at 04:04:16AM +0200, Barnabás Czémán wrote:
>> mbox_request_channel() returning value was changed in case of error.
>> It uses returning value of of_parse_phandle_with_args().
>> It is returning with -ENOENT instead of -ENODEV when no mboxes
>> property
>> exists.
>
> Why? What is the rationale?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/of/base.c#n1390
mailbox: use error ret code of of_parse_phandle_with_args() this commit
was changed the return value
from ENODEV to use retrun value of of_parse_phandle_with_args what is
returnung with EINVAL or ENOENT.
It makes skipping fallback path to parse qcom,ipc if there is no mboxes
property defined.
As far as I know qcom,ipc now only needed for rpm smd-edge on some SoCs
like 8939, 8916, 8976, 8917.
arm64: dts: qcom: msm8939: revert use of APCS mbox for RPM
>
>>
>> Fixes: 24fdd5074b20 ("mailbox: use error ret code of
>> of_parse_phandle_with_args()")
>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> ---
>> drivers/rpmsg/qcom_smd.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
>> index
>> 40d386809d6b78e209861c23d934e1b9fd743606..e552a9af578e48cfd854a228a4d91e4fa04bf29d
>> 100644
>> --- a/drivers/rpmsg/qcom_smd.c
>> +++ b/drivers/rpmsg/qcom_smd.c
>> @@ -1368,7 +1368,7 @@ static int qcom_smd_parse_edge(struct device
>> *dev,
>> edge->mbox_client.knows_txdone = true;
>> edge->mbox_chan = mbox_request_channel(&edge->mbox_client, 0);
>> if (IS_ERR(edge->mbox_chan)) {
>> - if (PTR_ERR(edge->mbox_chan) != -ENODEV) {
>> + if (PTR_ERR(edge->mbox_chan) != -ENOENT) {
>> ret = PTR_ERR(edge->mbox_chan);
>> goto put_node;
>> }
>>
>> --
>> 2.49.0
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] Fix fallback qcom,ipc parse
2025-04-21 2:04 [PATCH 0/2] Fix fallback qcom,ipc parse Barnabás Czémán
2025-04-21 2:04 ` [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to " Barnabás Czémán
2025-04-21 2:04 ` [PATCH 2/2] soc: qcom: smp2p: " Barnabás Czémán
@ 2025-04-22 8:21 ` Stephan Gerhold
2025-07-29 11:14 ` Nayeemahmed Badebade
2025-05-09 22:13 ` (subset) " Bjorn Andersson
3 siblings, 1 reply; 9+ messages in thread
From: Stephan Gerhold @ 2025-04-22 8:21 UTC (permalink / raw)
To: Barnabás Czémán
Cc: Bjorn Andersson, Mathieu Poirier, Tudor Ambarus, Jassi Brar,
Konrad Dybcio, linux-arm-msm, linux-remoteproc, linux-kernel,
Luca Weiss
On Mon, Apr 21, 2025 at 04:04:15AM +0200, Barnabás Czémán wrote:
> mbox_request_channel() returning value was changed in case of error.
> It uses returning value of of_parse_phandle_with_args().
> It is returning with -ENOENT instead of -ENODEV when no mboxes property
> exists.
>
> ENODEV was checked before fallback to parse qcom,ipc property.
>
Thanks for the fix!
Would be good to mention clearly that this fixes booting 6.15-rc on SoCs
that still use qcom,ipc (e.g. MSM8917, MSM8939).
Anyway, for both patches:
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Tested-by: Stephan Gerhold <stephan.gerhold@linaro.org> # msm8939
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
> Barnabás Czémán (2):
> rpmsg: qcom_smd: Fix fallback to qcom,ipc parse
> soc: qcom: smp2p: Fix fallback to qcom,ipc parse
>
> drivers/rpmsg/qcom_smd.c | 2 +-
> drivers/soc/qcom/smp2p.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
> ---
> base-commit: bc8aa6cdadcc00862f2b5720e5de2e17f696a081
> change-id: 20250421-fix-qcom-smd-76f7c414a11a
>
> Best regards,
> --
> Barnabás Czémán <barnabas.czeman@mainlining.org>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to qcom,ipc parse
2025-04-21 11:40 ` barnabas.czeman
@ 2025-04-24 11:16 ` Dmitry Baryshkov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2025-04-24 11:16 UTC (permalink / raw)
To: barnabas.czeman
Cc: Bjorn Andersson, Mathieu Poirier, Tudor Ambarus, Jassi Brar,
Konrad Dybcio, linux-arm-msm, linux-remoteproc, linux-kernel,
Luca Weiss
On Mon, Apr 21, 2025 at 01:40:50PM +0200, barnabas.czeman@mainlining.org wrote:
> On 2025-04-21 12:38, Dmitry Baryshkov wrote:
> > On Mon, Apr 21, 2025 at 04:04:16AM +0200, Barnabás Czémán wrote:
> > > mbox_request_channel() returning value was changed in case of error.
> > > It uses returning value of of_parse_phandle_with_args().
> > > It is returning with -ENOENT instead of -ENODEV when no mboxes
> > > property
> > > exists.
> >
> > Why? What is the rationale?
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/of/base.c#n1390
> mailbox: use error ret code of of_parse_phandle_with_args() this commit was
> changed the return value
> from ENODEV to use retrun value of of_parse_phandle_with_args what is
> returnung with EINVAL or ENOENT.
> It makes skipping fallback path to parse qcom,ipc if there is no mboxes
> property defined.
> As far as I know qcom,ipc now only needed for rpm smd-edge on some SoCs like
> 8939, 8916, 8976, 8917.
> arm64: dts: qcom: msm8939: revert use of APCS mbox for RPM
> >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: (subset) [PATCH 0/2] Fix fallback qcom,ipc parse
2025-04-21 2:04 [PATCH 0/2] Fix fallback qcom,ipc parse Barnabás Czémán
` (2 preceding siblings ...)
2025-04-22 8:21 ` [PATCH 0/2] Fix fallback " Stephan Gerhold
@ 2025-05-09 22:13 ` Bjorn Andersson
3 siblings, 0 replies; 9+ messages in thread
From: Bjorn Andersson @ 2025-05-09 22:13 UTC (permalink / raw)
To: Mathieu Poirier, Tudor Ambarus, Jassi Brar, Konrad Dybcio,
Barnabás Czémán
Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Luca Weiss
On Mon, 21 Apr 2025 04:04:15 +0200, Barnabás Czémán wrote:
> mbox_request_channel() returning value was changed in case of error.
> It uses returning value of of_parse_phandle_with_args().
> It is returning with -ENOENT instead of -ENODEV when no mboxes property
> exists.
>
> ENODEV was checked before fallback to parse qcom,ipc property.
>
> [...]
Applied, thanks!
[2/2] soc: qcom: smp2p: Fix fallback to qcom,ipc parse
commit: 421777a02bbd9cdabe0ae05a69ee06253150589d
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] Fix fallback qcom,ipc parse
2025-04-22 8:21 ` [PATCH 0/2] Fix fallback " Stephan Gerhold
@ 2025-07-29 11:14 ` Nayeemahmed Badebade
0 siblings, 0 replies; 9+ messages in thread
From: Nayeemahmed Badebade @ 2025-07-29 11:14 UTC (permalink / raw)
To: Stephan Gerhold
Cc: Barnabás Czémán, Bjorn Andersson, Mathieu Poirier,
Tudor Ambarus, Jassi Brar, Konrad Dybcio, linux-arm-msm,
linux-remoteproc, linux-kernel, Luca Weiss
On Tue, Apr 22, 2025 at 10:21:18AM +0200, Stephan Gerhold wrote:
> On Mon, Apr 21, 2025 at 04:04:15AM +0200, Barnabás Czémán wrote:
> > mbox_request_channel() returning value was changed in case of error.
> > It uses returning value of of_parse_phandle_with_args().
> > It is returning with -ENOENT instead of -ENODEV when no mboxes property
> > exists.
> >
> > ENODEV was checked before fallback to parse qcom,ipc property.
> >
>
> Thanks for the fix!
>
> Would be good to mention clearly that this fixes booting 6.15-rc on SoCs
> that still use qcom,ipc (e.g. MSM8917, MSM8939).
>
> Anyway, for both patches:
>
> Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> Tested-by: Stephan Gerhold <stephan.gerhold@linaro.org> # msm8939
>
Hi,
I think we should consider applying these fixes to stable versions such
as linux-5.15.y and linux-5.10.y
On v5.15.186 and v5.10.240, we noticed below errors with msm8916
platform:
[ 0.185835] qcom_smp2p: probe of smp2p-hexagon failed with error -2
[ 0.185905] qcom_smp2p: probe of smp2p-wcnss failed with error -2
[ 1.525302] smd:rpm: failed to parse smd edge
On these versions, msm8916 device tree still uses qcom,ipc, due to which
drivers in question fail with above errors.
Applying these patches on those versions, fixes the issues.
Also, only one patch which updates drivers/soc/qcom/smp2p.c seems to be
merged to mainline, while drivers/rpmsg/qcom_smd.c is not updated yet.
Thank you.
Tested-by: Nayeemahmed Badebade <nayeemahmed.badebade@sony.com> #msm8916
Regards,
Nayeem
> > Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> > ---
> > Barnabás Czémán (2):
> > rpmsg: qcom_smd: Fix fallback to qcom,ipc parse
> > soc: qcom: smp2p: Fix fallback to qcom,ipc parse
> >
> > drivers/rpmsg/qcom_smd.c | 2 +-
> > drivers/soc/qcom/smp2p.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> > ---
> > base-commit: bc8aa6cdadcc00862f2b5720e5de2e17f696a081
> > change-id: 20250421-fix-qcom-smd-76f7c414a11a
> >
> > Best regards,
> > --
> > Barnabás Czémán <barnabas.czeman@mainlining.org>
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-07-29 11:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 2:04 [PATCH 0/2] Fix fallback qcom,ipc parse Barnabás Czémán
2025-04-21 2:04 ` [PATCH 1/2] rpmsg: qcom_smd: Fix fallback to " Barnabás Czémán
2025-04-21 10:38 ` Dmitry Baryshkov
2025-04-21 11:40 ` barnabas.czeman
2025-04-24 11:16 ` Dmitry Baryshkov
2025-04-21 2:04 ` [PATCH 2/2] soc: qcom: smp2p: " Barnabás Czémán
2025-04-22 8:21 ` [PATCH 0/2] Fix fallback " Stephan Gerhold
2025-07-29 11:14 ` Nayeemahmed Badebade
2025-05-09 22:13 ` (subset) " Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox