Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f961f2e6 authored by Chris Lew's avatar Chris Lew
Browse files

rpmsg: glink: spi: 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.

Change-Id: If6d43ce481f28a46a344abe8eaf3ba476a3933ed
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 71c317cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ static void glink_spi_rx_advance(struct glink_spi *glink, size_t count)
	tail = pipe->local_addr;
	tail += count;

	if (tail > pipe->fifo_base + pipe->length)
	if (tail >= pipe->fifo_base + pipe->length)
		tail -= pipe->length;

	pipe->local_addr = tail;