[PATCH] mailbox: imx: return TXDB_V2 timeout errors

From: Pengpeng Hou

Date: Wed Jun 24 2026 - 10:37:26 EST


imx_mu_generic_tx() retries TXDB_V2 doorbell sends until the GIR bit
clears, but falls through to the common success return even when every
readl_poll_timeout() attempt failed.

Return the final timeout error after the retry loop so mailbox clients
can observe a failed doorbell send instead of treating it as successful.

Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
drivers/mailbox/imx-mailbox.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 246a9a9e3..86a8a590b 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -253,6 +253,8 @@ static int imx_mu_generic_tx(struct imx_mu_priv *priv,
cp->type, ++count);
}
}
+ if (ret)
+ return ret;
break;
default:
dev_warn_ratelimited(priv->dev, "Send data on wrong channel type: %d\n", cp->type);
--
2.50.1 (Apple Git-155)