rpmsg: glink: Set tail pointer to 0 at end of FIFO
Subsystems (2)
PATCH 1/1 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.
Signed-off-by Chris Lew <[email protected]>
--- drivers/rpmsg/qcom_glink_smem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rpmsg/qcom_glink_smem.c +1 -1
@@ -109,7 +109,7 @@ static void glink_smem_rx_advance(struct qcom_glink_pipe *np, tail =le32_to_cpu (*pipe->tail); tail += count; -if (tail > pipe->native.length) +if (tail >= pipe->native.length) tail -= pipe->native.length; *pipe->tail =cpu_to_le32 (tail);
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Bjorn Andersson
AppliedQuoted 3 lines · Chris Lew
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.
Applied
Thanks,
Bjorn
Quoted 22 lines
Signed-off-by Chris Lew <[email protected]>--- drivers/rpmsg/qcom_glink_smem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/rpmsg/qcom_glink_smem.c +1
-1@@ -109,7 +109,7 @@ static void glink_smem_rx_advance(struct qcom_glink_pipe *np, tail =le32_to_cpu (*pipe->tail); tail += count; -if (tail > pipe->native.length) +if (tail >= pipe->native.length) tail -= pipe->native.length; *pipe->tail =cpu_to_le32 (tail);Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project