mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
rpmsg: glink: Propagate TX failures in intentless mode as well
[ Upstream commit7a68f9fa97
] 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:8956927fae
("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>
This commit is contained in:
parent
54bad726f1
commit
6d877e6111
1 changed files with 6 additions and 4 deletions
|
@ -1348,8 +1348,9 @@ static int __qcom_glink_send(struct glink_channel *channel,
|
|||
ret = qcom_glink_tx(glink, &req, sizeof(req), data, chunk_size, wait);
|
||||
|
||||
/* Mark intent available if we failed */
|
||||
if (ret && intent) {
|
||||
intent->in_use = false;
|
||||
if (ret) {
|
||||
if (intent)
|
||||
intent->in_use = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1370,8 +1371,9 @@ static int __qcom_glink_send(struct glink_channel *channel,
|
|||
chunk_size, wait);
|
||||
|
||||
/* Mark intent available if we failed */
|
||||
if (ret && intent) {
|
||||
intent->in_use = false;
|
||||
if (ret) {
|
||||
if (intent)
|
||||
intent->in_use = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue