From: Jaehoon Chung <jh80.chung@samsung.com>
To: Shawn Lin <shawn.lin@rock-chips.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mmc: dw_mmc: avoid using dmaengine_terminate_all
Date: Tue, 29 Mar 2016 10:19:41 +0900 [thread overview]
Message-ID: <56F9D82D.4010305@samsung.com> (raw)
In-Reply-To: <1457490886-18092-1-git-send-email-shawn.lin@rock-chips.com>
Hi Shawn,
Sorry for applying late.
Applied on my repository.
Best Regards,
Jaehoon Chung
On 03/09/2016 11:34 AM, Shawn Lin wrote:
> dmaengine_terminate_all is deprecated and should be
> replaced by more explicit synchronous and asynchronous
> terminate functions. This change is based on the
> commit b36f09c3c441 ("dmaengine: Add transfer termination
> synchronization support"). Currently dw_mci_stop_dma
> may be called under the spinlock, let's migrate
> dmaengine_terminate_all to async terminate. This could
> avoid the race condition of use-after-free resouce of
> dmaengine once slave-dma driver implement the synchronize
> method.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
>
> drivers/mmc/host/dw_mmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 242f9a0..45a406f 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -680,7 +680,7 @@ static const struct dw_mci_dma_ops dw_mci_idmac_ops = {
>
> static void dw_mci_edmac_stop_dma(struct dw_mci *host)
> {
> - dmaengine_terminate_all(host->dms->ch);
> + dmaengine_terminate_async(host->dms->ch);
> }
>
> static int dw_mci_edmac_start_dma(struct dw_mci *host,
>
prev parent reply other threads:[~2016-03-29 1:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 2:34 [PATCH 2/2] mmc: dw_mmc: avoid using dmaengine_terminate_all Shawn Lin
2016-03-29 1:19 ` Jaehoon Chung [this message]
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=56F9D82D.4010305@samsung.com \
--to=jh80.chung@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=ulf.hansson@linaro.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