summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@nxp.com>2024-01-23 12:28:41 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-16 19:10:42 +0100
commit9851389b1c39b0fb54387105dd654e614d6749ef (patch)
treeb80b977f000473c328ae109eb1f471dd0628fadf /include
parentf7799ecf30beaf55289447e94856cd88ba61609b (diff)
downloadlinux-stable-9851389b1c39b0fb54387105dd654e614d6749ef.tar.gz
linux-stable-9851389b1c39b0fb54387105dd654e614d6749ef.tar.bz2
linux-stable-9851389b1c39b0fb54387105dd654e614d6749ef.zip
dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV
[ Upstream commit a22fe1d6dec7e98535b97249fdc95c2be79120bb ] is_slave_direction() should return true when direction is DMA_DEV_TO_DEV. Fixes: 49920bc66984 ("dmaengine: add new enum dma_transfer_direction") Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20240123172842.3764529-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dmaengine.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index c3656e590213..cff3dba65820 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -955,7 +955,8 @@ static inline int dmaengine_slave_config(struct dma_chan *chan,
static inline bool is_slave_direction(enum dma_transfer_direction direction)
{
- return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM);
+ return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM) ||
+ (direction == DMA_DEV_TO_DEV);
}
static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(