[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180920004001.GB2350@vkoul-mobl>
Date: Wed, 19 Sep 2018 17:40:01 -0700
From: Vinod <vkoul@...nel.org>
To: Sasha Levin <Alexander.Levin@...rosoft.com>
Cc: "stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH AUTOSEL 4.9 31/34] dmaengine: idma64: Support
dmaengine_terminate_sync()
On 15-09-18, 01:34, Sasha Levin wrote:
> From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>
> [ Upstream commit bbacb8e78a3b29ebdbb6af7d54fcf25d3f1c248f ]
>
> It appears that the driver misses the support of dmaengine_terminate_sync().
> Since many of callers expects this behaviour implement the new
> device_synchronize() callback to allow proper synchronization when stopping
> a channel.
Same for this patch as well. Adding optional call should not be stable
material
> Fixes: b36f09c3c441 ("dmaengine: Add transfer termination synchronization support")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Signed-off-by: Vinod Koul <vkoul@...nel.org>
> Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
> ---
> drivers/dma/idma64.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c
> index 1953e57505f4..2ee93cf98f00 100644
> --- a/drivers/dma/idma64.c
> +++ b/drivers/dma/idma64.c
> @@ -496,6 +496,13 @@ static int idma64_terminate_all(struct dma_chan *chan)
> return 0;
> }
>
> +static void idma64_synchronize(struct dma_chan *chan)
> +{
> + struct idma64_chan *idma64c = to_idma64_chan(chan);
> +
> + vchan_synchronize(&idma64c->vchan);
> +}
> +
> static int idma64_alloc_chan_resources(struct dma_chan *chan)
> {
> struct idma64_chan *idma64c = to_idma64_chan(chan);
> @@ -583,6 +590,7 @@ static int idma64_probe(struct idma64_chip *chip)
> idma64->dma.device_pause = idma64_pause;
> idma64->dma.device_resume = idma64_resume;
> idma64->dma.device_terminate_all = idma64_terminate_all;
> + idma64->dma.device_synchronize = idma64_synchronize;
>
> idma64->dma.src_addr_widths = IDMA64_BUSWIDTHS;
> idma64->dma.dst_addr_widths = IDMA64_BUSWIDTHS;
> --
> 2.17.1
--
~Vinod
Powered by blists - more mailing lists