diff options
author | Frank Li <Frank.Li@nxp.com> | 2024-01-23 12:28:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-23 08:12:53 +0100 |
commit | 743259cc178aee41626f5929ed9ea6f63bb0c631 (patch) | |
tree | 717a8e0a6fb2a0d1ca96e46f8f3357cf08cc7f06 /include/linux | |
parent | 9bb3bf598f4b0f5481dbc585db2d5021304ac1b5 (diff) | |
download | linux-stable-743259cc178aee41626f5929ed9ea6f63bb0c631.tar.gz linux-stable-743259cc178aee41626f5929ed9ea6f63bb0c631.tar.bz2 linux-stable-743259cc178aee41626f5929ed9ea6f63bb0c631.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/linux')
-rw-r--r-- | include/linux/dmaengine.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 50128c36f0b4..6e869419ab17 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -827,7 +827,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( |