remoteproc: Call mbox_client_txdone() after mbox_send_message() - #3498
Open
ukleinek wants to merge 1 commit into
Open
remoteproc: Call mbox_client_txdone() after mbox_send_message()#3498ukleinek wants to merge 1 commit into
ukleinek wants to merge 1 commit into
Conversation
It's necessary to call one of the txdone functions to get the mailbox state machine moving. Currently it still works by some luck: The message being sent is NULL. The framework code thus sets chan->active_req = NULL to signal that this message is currently sending out. On the next call to mbox_send_message() chan->active_req == NULL is interpreted differently though, that is as not busy and the next message is processed. The inner workings of the mailbox subsystem will change in commit c58e945 ("mailbox: Fix NULL message support in mbox_send_message()") that is part of v7.1-rc2 where this inconsistency is somewhat fixed. (Then -1 is the value that cannot be properly sent instead of (the more usual) NULL. The upside is that this -1 is properly catched as bogous.) To prepare updating the code to after v7.1-rc2 add a call to mbox_client_txdone() which is already now required conceptually, but deviating doesn't hurt while only sending NULL. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Collaborator
Author
|
I failed to mention: I'm not entirely sure this is correct. If it is the mailbox API has a strange consumer contract. But it makes the echo example work on v7.2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's necessary to call one of the txdone functions to get the mailbox state machine moving.
Currently it still works by some luck: The message being sent is NULL. The framework code thus sets chan->active_req = NULL to signal that this message is currently sending out. On the next call to mbox_send_message() chan->active_req == NULL is interpreted differently though, that is as not busy and the next message is processed.
The inner workings of the mailbox subsystem will change in commit c58e945 ("mailbox: Fix NULL message support in mbox_send_message()") that is part of v7.1-rc2 where this inconsistency is somewhat fixed. (Then -1 is the value that cannot be properly sent instead of (the more usual) NULL. The upside is that this -1 is properly catched as bogous.)
To prepare updating the code to after v7.1-rc2 add a call to mbox_client_txdone() which is already now required conceptually, but deviating doesn't hurt while only sending NULL.
PR Type
PR Checklist