mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Viresh Kumar <vireshk@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Vinod Koul <vinod.koul@intel.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: dw: fix cyclic transfers
Date: Mon, 11 Jan 2016 12:19:50 +0000	[thread overview]
Message-ID: <yw1xbn8sxq8p.fsf@unicorn.mansr.com> (raw)
In-Reply-To: <20160111061051.GC3448@ubuntu> (Viresh Kumar's message of "Mon, 11 Jan 2016 11:40:51 +0530")

Viresh Kumar <viresh.kumar@linaro.org> writes:

> 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@mansr.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 :(

It's not the only one, I'm afraid.

> 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.

Good idea.  New patch coming up.

-- 
Måns Rullgård

      reply	other threads:[~2016-01-11 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-10 20:54 Mans Rullgard
2016-01-11  6:10 ` Viresh Kumar
2016-01-11 12:19   ` Måns Rullgård [this message]

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=yw1xbn8sxq8p.fsf@unicorn.mansr.com \
    --to=mans@mansr.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@linaro.org \
    --cc=vireshk@kernel.org \
    /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

all inboxes | Powered by JetHome®