mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Shevchenko, Andriy" <andriy.shevchenko@intel.com>
To: George Cherian <george.cherian@ti.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"balbi@ti.com" <balbi@ti.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Koul, Vinod" <vinod.koul@intel.com>,
	"msmucr@gmail.com" <msmucr@gmail.com>
Subject: Re: [PATCH 1/2] dma: cppi41: start tear down only if channel is busy
Date: Thu, 27 Feb 2014 08:47:42 +0000	[thread overview]
Message-ID: <1393490862.28803.40.camel@smile.fi.intel.com> (raw)
In-Reply-To: <1393478081-14226-2-git-send-email-george.cherian@ti.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1843 bytes --]

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@ti.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@intel.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.
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2014-02-27  8:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27  5:14 [PATCH 0/2] Fix CPPI Warnings during tear down after ISOCH transfers George Cherian
2014-02-27  5:14 ` [PATCH 1/2] dma: cppi41: start tear down only if channel is busy George Cherian
2014-02-27  8:47   ` Shevchenko, Andriy [this message]
2014-02-28  5:53     ` George Cherian
2014-02-27  5:14 ` [PATCH 2/2] usb: musb: musb_cppi41: Dont reprogram DMA if tear down is initiated George Cherian
2014-03-11 10:53 ` [PATCH 0/2] Fix CPPI Warnings during tear down after ISOCH transfers Vinod Koul

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=1393490862.28803.40.camel@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=balbi@ti.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=george.cherian@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=msmucr@gmail.com \
    --cc=vinod.koul@intel.com \
    /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

Powered by JetHome