From: Baolin Wang <baolin.wang@linaro.org>
To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@spreadtrum.com
Cc: broonie@kernel.org, baolin.wang@linaro.org,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] dmaengine: sprd: Set cur_desc as NULL when free or terminate one dma channel
Date: Sat, 29 Sep 2018 13:49:02 +0800 [thread overview]
Message-ID: <3a42dff7df19aa14d61b95f81ff22a7e16939ecd.1538199697.git.baolin.wang@linaro.org> (raw)
In-Reply-To: <cover.1538199697.git.baolin.wang@linaro.org>
In-Reply-To: <cover.1538199697.git.baolin.wang@linaro.org>
From: Eric Long <eric.long@spreadtrum.com>
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>
---
drivers/dma/sprd-dma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index e6a74dc..1b39661 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,
--
1.7.9.5
next prev parent reply other threads:[~2018-09-29 5:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-29 5:48 [PATCH 0/7] Add some fixes and new feature for SPRD DMA Baolin Wang
2018-09-29 5:48 ` [PATCH 1/7] dmaengine: sprd: Remove direction usage from struct dma_slave_config Baolin Wang
2018-09-29 5:49 ` [PATCH 2/7] dmaengine: sprd: Get transfer residue depending on the transfer direction Baolin Wang
2018-09-29 5:49 ` [PATCH 3/7] dmaengine: sprd: Fix the last link-list configuration Baolin Wang
2018-09-29 5:49 ` Baolin Wang [this message]
2018-09-29 5:49 ` [PATCH 5/7] dmaengine: sprd: Support DMA link-list cyclic callback Baolin Wang
2018-09-29 5:49 ` [PATCH 6/7] dmaengine: sprd: Support DMA 2-stage transfer mode Baolin Wang
2018-09-29 5:49 ` [PATCH 7/7] dmaengine: sprd: Add me as one of the module authors Baolin Wang
2018-10-18 9:29 ` [PATCH 0/7] Add some fixes and new feature for SPRD DMA Baolin Wang
2018-10-20 16:30 ` Vinod
2018-10-22 7:14 ` Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a42dff7df19aa14d61b95f81ff22a7e16939ecd.1538199697.git.baolin.wang@linaro.org \
--to=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=eric.long@spreadtrum.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).