]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Jul 2023 10:16:54 +0000 (12:16 +0200)
commit975c31ea3db948995148b23f5178a1c1f9aefcf2
treef6636092c0fffb04b55908a6820615789f5bdbd2
parent19541d795795cfab0d65a305f10ebda779d6670f
rpmsg: glink: Propagate TX failures in intentless mode as well

BugLink: https://bugs.launchpad.net/bugs/2025067
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/rpmsg/qcom_glink_native.c