[PATCH v2 03/15] firmware: arm_scmi: Use mbox_ring_doorbell() instead of NULL message

Douglas Anderson dianders at chromium.org
Sat Feb 7 20:01:25 PST 2026


As per the patch ("mailbox: Deprecate NULL mbox messages; Introduce
mbox_ring_doorbell()"), we want to switch all users of NULL mailbox
messages to use mbox_ring_doorbell().

The mbox_ring_doorbell() explicitly documents not to call
mbox_client_txdone() for doorbells, so remove the call.

NOTE: this mailbox client appears to send doorbells and regular
messages on the same mailbox channel (smbox->chan), so it needs some
extra attention. Specifically, the new API behaves differently if you
ring a doorbell while a non-doorbell message is in progress. I don't
believe that this is something we have to worry about with this
mailbox client, though, because the code was calling
mbox_client_txdone() after sending the NULL message. Had a non-mailbox
message been in progress, that would have marked the in-progress
message as done instead of marking the NULL message as done.

Signed-off-by: Douglas Anderson <dianders at chromium.org>
---
Given that this mailbox client appears to exercise the mixed
doorbell/normal message case and the behavior there changed a tiny
bit, I'd love any extra scrutiny on this patch. Thanks!

(no changes since v1)

 drivers/firmware/arm_scmi/transports/mailbox.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/firmware/arm_scmi/transports/mailbox.c b/drivers/firmware/arm_scmi/transports/mailbox.c
index ae0f67e6cc45..c4561441ac2e 100644
--- a/drivers/firmware/arm_scmi/transports/mailbox.c
+++ b/drivers/firmware/arm_scmi/transports/mailbox.c
@@ -324,7 +324,6 @@ static void mailbox_clear_channel(struct scmi_chan_info *cinfo)
 {
 	struct scmi_mailbox *smbox = cinfo->transport_info;
 	struct mbox_chan *intr_chan;
-	int ret;
 
 	core->shmem->clear_channel(smbox->shmem);
 
@@ -338,12 +337,7 @@ static void mailbox_clear_channel(struct scmi_chan_info *cinfo)
 	else
 		return;
 
-	ret = mbox_send_message(intr_chan, NULL);
-	/* mbox_send_message returns non-negative value on success, so reset */
-	if (ret > 0)
-		ret = 0;
-
-	mbox_client_txdone(intr_chan, ret);
+	mbox_ring_doorbell(intr_chan);
 }
 
 static bool
-- 
2.53.0.rc2.204.g2597b5adb4-goog




More information about the linux-arm-kernel mailing list