Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1305696 > unrolled thread
| Started by | Mans Rullgard <mans@mansr.com> |
|---|---|
| First post | 2016-01-10 22:00 +0100 |
| Last post | 2016-01-11 13:30 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] dmaengine: dw: fix cyclic transfers Mans Rullgard <mans@mansr.com> - 2016-01-10 22:00 +0100
Re: [PATCH] dmaengine: dw: fix cyclic transfers Viresh Kumar <viresh.kumar@linaro.org> - 2016-01-11 07:20 +0100
Re: [PATCH] dmaengine: dw: fix cyclic transfers Måns Rullgård <mans@mansr.com> - 2016-01-11 13:30 +0100
| From | Mans Rullgard <mans@mansr.com> |
|---|---|
| Date | 2016-01-10 22:00 +0100 |
| Subject | [PATCH] dmaengine: dw: fix cyclic transfers |
| Message-ID | <qPvfI-Ou-3@gated-at.bofh.it> |
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);
--
2.7.0
[toc] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-01-11 07:20 +0100 |
| Message-ID | <qPDZE-6S3-1@gated-at.bofh.it> |
| In reply to | #1305696 |
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 :(
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
[toc] | [prev] | [next] | [standalone]
| From | Måns Rullgård <mans@mansr.com> |
|---|---|
| Date | 2016-01-11 13:30 +0100 |
| Message-ID | <qPJLI-2jg-19@gated-at.bofh.it> |
| In reply to | #1305872 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web