Patch "spi: rockchip: Signal unfinished DMA transfers" has been added to the 4.6-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
spi: rockchip: Signal unfinished DMA transfers
to the 4.6-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-rockchip-signal-unfinished-dma-transfers.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4dc0dd83603f05dc3ae152af33ecb15104c313f3Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <[email protected]>
Date: Wed, 8 Jun 2016 09:32:51 +0200
Subject: spi: rockchip: Signal unfinished DMA transfers
From: Tomeu Vizoso <[email protected]>
commit 4dc0dd83603f05dc3ae152af33ecb15104c313f3 upstream.
When using DMA, the transfer_one callback should return 1 because the transfer hasn't finished yet.
A previous commit changed the function to return 0 when the DMA channels were correctly prepared.
This manifested in Veyron boards with this message:
[ 1.983605] cros-ec-spi spi0.0: EC failed to respond in time
--- drivers/spi/spi-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-rockchip.c +3 -1
@@ -578,7 +578,7 @@ static int rockchip_spi_transfer_one(struct spi_device *spi, struct spi_transfer *xfer) { - int ret = 1; + int ret = 0;struct rockchip_spi *rs =spi_master_get_devdata (master); WARN_ON(readl_relaxed(rs->regs + ROCKCHIP_SPI_SSIENR) &&
@@ -627,6 +627,8 @@ static int rockchip_spi_transfer_one(spi_enable_chip (rs,1 ); ret =rockchip_spi_prepare_dma (rs); } +/* successful DMA prepare means the transfer is in progress */ + ret = ret ? ret :1 ; }else {spi_enable_chip (rs,1 ); ret =rockchip_spi_pio_transfer (rs);
Patches currently in stable-queue which might be from [email protected] are
queue-4.6/spi-rockchip-signal-unfinished-dma-transfers.patch