]> git.baikalelectronics.ru Git - kernel.git/commit
spi: stm32: fix DMA configuration with only one channel
authorCezary Gapinski <cezary.gapinski@gmail.com>
Mon, 24 Dec 2018 22:00:29 +0000 (23:00 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 7 Jan 2019 18:23:56 +0000 (18:23 +0000)
commit57fea748600a703995fa97907ccffd1ae71ae4d4
tree2fb9a964a80a2d30690b35298aaa5335fe4aae87
parentf46b57df93e14db103b1ecf135bc0f464fe5ab13
spi: stm32: fix DMA configuration with only one channel

When SPI driver is configured to work only with TX or RX DMA channel
then dmaengine functions can dereferene NULL pointer.

Running full-duplex mode when when only RX or TX DMA channel is
available can cause overrun condition or incorrect writing to transmit
buffer so disable this types of DMA configuration and go back to
interrupt mode.

Signed-off-by: Cezary Gapinski <cezary.gapinski@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c