mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
rpmsg: glink: Set tail pointer to 0 at end of FIFO
When wrapping around the FIFO, the remote expects the tail pointer to
be reset to 0 on the edge case where the tail equals the FIFO length.
Fixes: caf989c350
("rpmsg: glink: Introduce glink smem based transport")
Cc: stable@vger.kernel.org
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
bbe692e349
commit
4623e8bf1d
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ static void glink_smem_rx_advance(struct qcom_glink_pipe *np,
|
||||||
tail = le32_to_cpu(*pipe->tail);
|
tail = le32_to_cpu(*pipe->tail);
|
||||||
|
|
||||||
tail += count;
|
tail += count;
|
||||||
if (tail > pipe->native.length)
|
if (tail >= pipe->native.length)
|
||||||
tail -= pipe->native.length;
|
tail -= pipe->native.length;
|
||||||
|
|
||||||
*pipe->tail = cpu_to_le32(tail);
|
*pipe->tail = cpu_to_le32(tail);
|
||||||
|
|
Loading…
Reference in a new issue