[PATCH v2 2/2] soc: qcom: smsm: Don't log an error for hosts without a mailbox

From: Alexandre Rapaille via B4 Relay

Date: Thu Dec 03 2026 - 05:57:27 EST


From: Alexandre Rapaille <arapaille@xxxxxxxxxxxxxxxxxxxx>

smsm_parse_mbox() calls mbox_request_channel() for every host, so the
mailbox core logs an error for each host that has no mailbox before smsm
falls back to qcom,ipc. On msm8974 SMEM reports 5 hosts while mboxes has
4 entries, the first a null placeholder for the local host, so every
boot prints twice:

qcom-smsm smsm: mbox_request_channel: can't parse "mboxes" property

Use mbox_request_channel_optional() and fall back quietly when the entry
is null or missing.

Tested on a Fairphone 2 with next-20261127: both lines are gone, hosts
1-3 still get their mailbox channel, and the modem comes back after
forced restarts.

Signed-off-by: Alexandre Rapaille <arapaille@xxxxxxxxxxxxxxxxxxxx>
---
drivers/soc/qcom/smsm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
index f6b7266a5af0..9623146da8c7 100644
--- a/drivers/soc/qcom/smsm.c
+++ b/drivers/soc/qcom/smsm.c
@@ -370,10 +370,12 @@ static int smsm_parse_mbox(struct qcom_smsm *smsm, unsigned int host_id)
struct smsm_host *host = &smsm->hosts[host_id];
int ret = 0;

- host->mbox_chan = mbox_request_channel(&smsm->mbox_client, host_id);
+ host->mbox_chan = mbox_request_channel_optional(&smsm->mbox_client, host_id);
if (IS_ERR(host->mbox_chan)) {
ret = PTR_ERR(host->mbox_chan);
host->mbox_chan = NULL;
+ } else if (!host->mbox_chan) {
+ ret = -ENOENT;
}

return ret;

--
2.43.0