• Amelie Delaunay's avatar
    spi: stm32: enhance DMA error management · c67ad368
    Amelie Delaunay authored
    This patch reworks DMA error management. In case the DMA callback is
    called while EOT (End Of Transfer) flag is not set, that means that DMA
    encountered an error. This error will result in an auto-suspend of SPI
    flow, which could also result in an overrun. So, in DMA mode, SUSP and
    OVR flags are a condition to stop the current transfer.
    
    Moreover, stm32_spi_can_dma doesn't care about the state of dma channels.
    During driver probe, master->can_dma is initialised if dma channel request
    is successful. That's why we must use master->can_dma to know if dma
    use is possible (dma channel are successfully requested and the transfer
    size is greater than fifo size).
    Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    c67ad368
spi-stm32.c 34.7 KB