soc: qcom: aoss: Return error in qmp_send

The wait_event_interruptible_timeout api can return ERESTARTSYS if the
calling thread is signalled. Update the qmp_send API so that this error
is propagated back to the client so they can decide whether the call
needs to be retried.

Change-Id: I40794a30bc54ceb2f027c19179dbca7f4ed28bcc
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
Signed-off-by: Pranav Mahesh Phansalkar <quic_pphansal@quicinc.com>
(cherry picked from commit 8375788117)
This commit is contained in:
Pranav Mahesh Phansalkar 2022-09-20 15:38:50 -07:00 committed by Bharat Bommena
parent c737adb0d7
commit 478f519958

View file

@ -262,6 +262,9 @@ int qmp_send(struct qmp *qmp, const void *data, size_t len)
/* Clear message from buffer */
AOSS_INFO("timed out clearing msg: %.*s\n", len, (char *)data);
writel(0, qmp->msgram + qmp->offset);
} else if (time_left < 0) {
dev_err(qmp->dev, "wait error %ld\n", time_left);
ret = time_left;
} else {
ret = 0;
AOSS_INFO("ack: %.*s\n", len, (char *)data);