rpmsg: glink: Set tail pointer to 0 at end of FIFO
authorChris Lew <clew@codeaurora.org>
Thu, 28 Jun 2018 01:19:57 +0000 (18:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:57:26 +0000 (10:57 +0100)
commit6c4560364d2648128e75fc1e6ce0af98e285a160
tree74e6e635479ccc522948ba7470919b7fa5ce22d1
parent2f5d27ddbfe036430650c222fde04a2a3fadc132
rpmsg: glink: Set tail pointer to 0 at end of FIFO

commit 4623e8bf1de0b86e23a56cdb39a72f054e89c3bd upstream.

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: caf989c350e8 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rpmsg/qcom_glink_smem.c