提交 c61b781e 编写于 作者: S Sudeep Holla 提交者: Jassi Brar

mailbox: always wait in mbox_send_message for blocking Tx mode

There exists a race when msg_submit return immediately as there was an
active request being processed which may have completed just before it's
checked again in mbox_send_message. This will result in return to the
caller without waiting in mbox_send_message even when it's blocking Tx.

This patch fixes the issue by waiting for the completion always if Tx
is in blocking mode.

Fixes: 2b6d83e2 ("mailbox: Introduce framework for mailbox")
Reported-by: NAlexey Klimov <alexey.klimov@arm.com>
Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
Reviewed-by: NAlexey Klimov <alexey.klimov@arm.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 73874913
......@@ -260,7 +260,7 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg)
msg_submit(chan);
if (chan->cl->tx_block && chan->active_req) {
if (chan->cl->tx_block) {
unsigned long wait;
int ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册