diff options
author | Eric Long <eric.long@spreadtrum.com> | 2018-11-06 06:01:34 +0100 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-12-05 09:57:12 +0100 |
commit | 0e5d7b1eb6fc06d2f9287519e238fa13efb69cee (patch) | |
tree | 8b3f575e8ce263dd88915a0cb569cfb671a0c19f /drivers/dma | |
parent | dmaengine: sprd: Fix the last link-list configuration (diff) | |
download | linux-0e5d7b1eb6fc06d2f9287519e238fa13efb69cee.tar.xz linux-0e5d7b1eb6fc06d2f9287519e238fa13efb69cee.zip |
dmaengine: sprd: Set cur_desc as NULL when free or terminate one dma channel
It will be failed to start one new transfer if the channel started one
none interrupt transfer before, since we will only set the schan->cur_desc
as NULL depending on the transfer interrupt now. Thus we should set
schan->cur_desc as NULL when free or terminate one dma channel to
avoid this issue.
Signed-off-by: Eric Long <eric.long@spreadtrum.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/sprd-dma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index e6a74dc7da95..1b39661cd17b 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -439,6 +439,7 @@ static void sprd_dma_stop(struct sprd_dma_chn *schan) sprd_dma_stop_and_disable(schan); sprd_dma_unset_uid(schan); sprd_dma_clear_int(schan); + schan->cur_desc = NULL; } static bool sprd_dma_check_trans_done(struct sprd_dma_desc *sdesc, |