Re: [PATCH] RFC: mailbox: Fix NULL message support in

From: Joonwon Kang

Date: Thu Mar 12 2026 - 03:35:08 EST


> The active_req field serves double duty as both the "is a TX in
> flight" flag (NULL means idle) and the storage for the in-flight
> message pointer. When a client sends NULL via mbox_send_message(),
> active_req is set to NULL, which the framework misinterprets as
> "no active request." This breaks the TX state machine by:
>
> - tx_tick() short-circuits on (!mssg), skipping the tx_done
> callback and the tx_complete completion
> - txdone_hrtimer() skips the channel entirely since active_req
> is NULL, so poll-based TX-done detection never fires.
>
> Fix this by introducing a MBOX_NO_MSG sentinel value that means
> "no active request," freeing NULL to be valid message data. The
> sentinel is internal to the mailbox core and is never exposed to
> controller drivers or clients.
>
> The only tradeoff is that 'MBOX_NO_MSG' can not be used as a message
> by clients.

I was surprised to find out this alternative patch while we have been waiting
a few months for your response to my previous patch for this issue on
https://lore.kernel.org/all/20251126045926.2413532-1-joonwonkang@xxxxxxxxxx/.

Will you handle this issue on your end? If so, could you leave the original
discussion link to the commit message so that we could better track it? Also,
could you reply to the original patches next time with what you have decided
or at least cc the people who posted the original patches to your new patches
for better collaboration?

Thanks.