lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Jan 2016 11:40:51 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Mans Rullgard <mans@...sr.com>
Cc:	Viresh Kumar <vireshk@...nel.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Dan Williams <dan.j.williams@...el.com>,
	Vinod Koul <vinod.koul@...el.com>, dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dmaengine: dw: fix cyclic transfers

On 10-01-16, 20:54, Mans Rullgard wrote:
> Commit 61e183f83069 ("dmaengine/dw_dmac: Reconfigure interrupt and
> chan_cfg register on resume") moved some channel initialisation to
> a new function which must be called before starting a transfer.
> 
> This adds the necessary dwc_initialize() call to dw_dma_cyclic_start()
> which was missed in the original commit.
> 
> Fixes: 61e183f83069 ("dmaengine/dw_dmac: Reconfigure interrupt and chan_cfg register on resume")
> Signed-off-by: Mans Rullgard <mans@...sr.com>
> ---
> Andy, do you want to collect this with your other patches?  It's trivial
> enough that it can go in separately without conflicts too.
> ---
>  drivers/dma/dw/core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
> index 7067b6ddc1db..2917f75b67b4 100644
> --- a/drivers/dma/dw/core.c
> +++ b/drivers/dma/dw/core.c
> @@ -1265,6 +1265,8 @@ int dw_dma_cyclic_start(struct dma_chan *chan)
>  		return -EBUSY;
>  	}
>  
> +	dwc_initialize(dwc);
> +
>  	dma_writel(dw, CLEAR.ERROR, dwc->mask);
>  	dma_writel(dw, CLEAR.XFER, dwc->mask);

Ahh, that's a very very old bug :(

Okay, things got cleaned up by putting the dwc_initialize() call
within dwc_dostart() and so it worked for all other DMA APIs.

What about calling dwc_dostart() from within dw_dma_cyclic_start()?
That will simplify it and remove code duplication issue as well.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ