Skip to content
Commit 1e87837f authored by Gerhard Jörges's avatar Gerhard Jörges Committed by Carles Cufí
Browse files

drivers: spi: pl022: fix dropping RX bytes



If the thread that submits data over spi is interrupted by a higher
priority thread while pushing data to the tx fifo the hardware pushes
data to spi and frees up space in the fifo. In this case more than
8 Bytes are written to the tx fifo and bytes in the rx fifo get lost
before they are collected in the rx while loop.
To avoid this, the tx loop is exited after a maximum of 8 bytes and the
rx loop will run until it collected all bytes from the rx fifo.

Signed-off-by: default avatarGerhard Jörges <joerges@metratec.com>
parent af4a87af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment