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]
Message-ID: <1393490862.28803.40.camel@smile.fi.intel.com>
Date:	Thu, 27 Feb 2014 08:47:42 +0000
From:	"Shevchenko, Andriy" <andriy.shevchenko@...el.com>
To:	George Cherian <george.cherian@...com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"balbi@...com" <balbi@...com>,
	"Williams, Dan J" <dan.j.williams@...el.com>,
	"Koul, Vinod" <vinod.koul@...el.com>,
	"msmucr@...il.com" <msmucr@...il.com>
Subject: Re: [PATCH 1/2] dma: cppi41: start tear down only if channel is busy

On Thu, 2014-02-27 at 10:44 +0530, George Cherian wrote:
> Start the channel tear down only if the channel is busy, else just
> bail out. In some cases its seen that by the time the tear down is
> initiated the cppi completes the DMA, especially in ISOCH transfers.
> 
> Signed-off-by: George Cherian <george.cherian@...com>
> ---
>  drivers/dma/cppi41.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
> index c18aebf..d028f36 100644
> --- a/drivers/dma/cppi41.c
> +++ b/drivers/dma/cppi41.c
> @@ -620,12 +620,15 @@ static int cppi41_stop_chan(struct dma_chan *chan)
>  	u32 desc_phys;
>  	int ret;
>  
> +	desc_phys = lower_32_bits(c->desc_phys);
> +	desc_num = (desc_phys - cdd->descs_phys) / sizeof(struct cppi41_desc);
> +	if (!cdd->chan_busy[desc_num])
> +		return 0;
> +
>  	ret = cppi41_tear_down_chan(c);
>  	if (ret)
>  		return ret;
>  
> -	desc_phys = lower_32_bits(c->desc_phys);
> -	desc_num = (desc_phys - cdd->descs_phys) / sizeof(struct cppi41_desc);
>  	WARN_ON(!cdd->chan_busy[desc_num]);

Do you still need this WARN_ON?

>  	cdd->chan_busy[desc_num] = NULL;
>  


-- 
Andy Shevchenko <andriy.shevchenko@...el.com>
Intel Finland Oy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ