Patch "spi: sun6i: reduce DMA RX transfer width to single byte" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    spi: sun6i: reduce DMA RX transfer width to single byte

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-sun6i-reduce-dma-rx-transfer-width-to-single-byt.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit eab8236049c5ac7eea9ff7d50ac627acda68c94c
Author: Tobias Schramm <t.schramm@xxxxxxxxxxx>
Date:   Sun Aug 27 17:25:57 2023 +0200

    spi: sun6i: reduce DMA RX transfer width to single byte
    
    [ Upstream commit 171f8a49f212e87a8b04087568e1b3d132e36a18 ]
    
    Through empirical testing it has been determined that sometimes RX SPI
    transfers with DMA enabled return corrupted data. This is down to single
    or even multiple bytes lost during DMA transfer from SPI peripheral to
    memory. It seems the RX FIFO within the SPI peripheral can become
    confused when performing bus read accesses wider than a single byte to it
    during an active SPI transfer.
    
    This patch reduces the width of individual DMA read accesses to the
    RX FIFO to a single byte to mitigate that issue.
    
    Signed-off-by: Tobias Schramm <t.schramm@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230827152558.5368-2-t.schramm@xxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
index 23ad052528dbe..2bfe87873edb3 100644
--- a/drivers/spi/spi-sun6i.c
+++ b/drivers/spi/spi-sun6i.c
@@ -200,7 +200,7 @@ static int sun6i_spi_prepare_dma(struct sun6i_spi *sspi,
 		struct dma_slave_config rxconf = {
 			.direction = DMA_DEV_TO_MEM,
 			.src_addr = sspi->dma_addr_rx,
-			.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+			.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE,
 			.src_maxburst = 8,
 		};
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux