public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Cherian <george.cherian@ti.com>
To: "Shevchenko, Andriy" <andriy.shevchenko@intel.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: Fri, 28 Feb 2014 11:23:41 +0530	[thread overview]
Message-ID: <53102465.4030600@ti.com> (raw)
In-Reply-To: <1393490862.28803.40.camel@smile.fi.intel.com>

On 2/27/2014 2:17 PM, Shevchenko, Andriy wrote:
> 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?

Yes in some cases wherein the channel is busy and tear down didn't 
happen successfully.
>
>>   	cdd->chan_busy[desc_num] = NULL;
>>   
>


-- 
-George


  reply	other threads:[~2014-02-28  5:53 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
2014-02-28  5:53     ` George Cherian [this message]
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=53102465.4030600@ti.com \
    --to=george.cherian@ti.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=balbi@ti.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --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