dmaengine: tegra-apb: Error out if DMA_PREP_INTERRUPT flag is unset
authorDmitry Osipenko <digetx@gmail.com>
Wed, 29 May 2019 21:43:55 +0000 (00:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Aug 2019 17:06:47 +0000 (19:06 +0200)
commitd8388cbd4327d2dc9e8d12cf396ac97c26fd0b19
treebdcb6e7846c5d19df69574ff9815fa8859eeccd5
parentf486088d38ec174ffdd6183535b45dac6d568e22
dmaengine: tegra-apb: Error out if DMA_PREP_INTERRUPT flag is unset

[ Upstream commit dc161064beb83c668e0f85766b92b1e7ed186e58 ]

Apparently driver was never tested with DMA_PREP_INTERRUPT flag being
unset since it completely disables interrupt handling instead of skipping
the callbacks invocations, hence putting channel into unusable state.

The flag is always set by all of kernel drivers that use APB DMA, so let's
error out in otherwise case for consistency. It won't be difficult to
support that case properly if ever will be needed.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/tegra20-apb-dma.c