dmaengine: stm32-dma: check whether length is aligned on FIFO threshold
authorPierre-Yves MORDRET <pierre-yves.mordret@st.com>
Tue, 11 Sep 2018 07:31:16 +0000 (09:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:21:35 +0000 (09:21 +0100)
commitecda0abb141725d9d76dcc8b07c78b4506098b73
tree1068551e2f6e738d1749f7d6b1d448bd5db296e4
parentf0b7d56f1fd58b7a45c2ebe06fa96eea68eb2ea3
dmaengine: stm32-dma: check whether length is aligned on FIFO threshold

commit cc832dc8e32785a730ba07c3a357e17c201a5df8 upstream.

When a period length is not multiple of FIFO some data may be stuck
within FIFO.

Burst/FIFO Threshold/Period or buffer length check has to be hardened

In any case DMA will grant any request from client but will degraded
any parameters whether awkward.

Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/stm32-dma.c