]> www.infradead.org Git - users/dwmw2/linux.git/commit
rpmsg: glink: Propagate TX failures in intentless mode as well
authorBjorn Andersson <quic_bjorande@quicinc.com>
Tue, 18 Apr 2023 16:30:17 +0000 (09:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:16 +0000 (23:03 +0900)
commitd29faefa8d21ec57c58d71020343ddf21e27ffa3
treecb182a1492912fd54be3c2649583c372f08a9787
parent2f51bac2767837831e050997ebfe4a5f51272a24
rpmsg: glink: Propagate TX failures in intentless mode as well

[ Upstream commit 7a68f9fa97357a0f2073c9c31ed4101da4fce93e ]

As support for splitting transmission over several messages using
TX_DATA_CONT was introduced it does not immediately return the return
value of qcom_glink_tx().

The result is that in the intentless case (i.e. intent == NULL), the
code will continue to send all additional chunks. This is wasteful, and
it's possible that the send operation could incorrectly indicate
success, if the last chunk fits in the TX fifo.

Fix the condition.

Fixes: 8956927faed3 ("rpmsg: glink: Add TX_DATA_CONT command while sending")
Reviewed-by: Chris Lew <quic_clew@quicinc.com>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230418163018.785524-2-quic_bjorande@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rpmsg/qcom_glink_native.c