spi: sun6i: fix RX data corruption in DMA mode
authorMark Brown <broonie@kernel.org>
Mon, 4 Sep 2023 14:53:37 +0000 (15:53 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 4 Sep 2023 14:53:37 +0000 (15:53 +0100)
commit578464679f33cde8331507c78f7b302299df7783
tree2c2f8f6e1561190ef9b499db1e195512a9591ee8
parent60ea3db33fbddf559e18567ca8897f6bb9f25290
parent1f11f4202caf5710204d334fe63392052783876d
spi: sun6i: fix RX data corruption in DMA mode

Merge series from Tobias Schramm <t.schramm@manjaro.org>:

This set of patches fixes two bugs in the sun6i SPI driver that result in
corruption of received data in DMA RX mode.

The first bug seems to be related to an incompatibility of the SPI RX FIFO
with wider than single byte read accesses during SPI transfers. I'm not
sure if this bug affects all types of SPI controllers found in Allwinner
SoCs supported by this driver. However reducing the access width should
always be safe. I've tested this change on a V3s SoC. Further testing to
narrow down the set of affected SoCs in the future would be welcome.

The second bug is a race between SPI RX DMA and FIFO drain logic for
interrupt-based SPI operation. This bug affects all SPI controllers
supported by this driver. Once again this change has been tested on the
Allwinner V3s SoC.
MAINTAINERS
drivers/spi/spi-cadence.c
drivers/spi/spi-stm32.c
drivers/spi/spi-sun6i.c