OSDN Git Service

spi: dw-dma: Fail DMA-based transfer if no Tx-buffer specified
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Sun, 20 Sep 2020 11:23:13 +0000 (14:23 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 29 Sep 2020 15:37:06 +0000 (16:37 +0100)
commit7ef30385b05fa8bc13f473c9b0b3ecc7dfb2b208
tree076830d7487e642e62fd6cd5da02e2f28894a37d
parent01ddbbb0b0af255d93b279f83c4ff91d494397d9
spi: dw-dma: Fail DMA-based transfer if no Tx-buffer specified

Since commit 46164fde6b78 ("spi: dw: Fix Rx-only DMA transfers") if DMA
interface is enabled, then Tx-buffer must be available in each SPI
transfer. It's required since in order to activate the incoming data
reception either DMA or CPU must be pushing data out to the SPI bus.
But the DW APB SSI DMA driver code is still left in state as if Tx-buffer
might be optional, which is no longer true. Let's fix it so an error would
be returned if no Tx-buffer detected and DMA Tx would be always
enabled.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20200920112322.24585-3-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw-dma.c