lkml.org 
[lkml]   [2013]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error
Hi Morimoto-san

On Tue, 23 Jul 2013, Kuninori Morimoto wrote:

> sh_desc->hw.tcr is controlling real data size,
> and, register TCR is controlling data transfer count
> which was xmit_shifted value of hw.tcr.
> Current sh_dmae_get_partial() is calculating in different unit.
> This patch fixes it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Looks right to me

Acked-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>

Thanks
Guennadi

> ---
> >> Guennadi
>
> Could you please check this patch, and give it your Acked-by ?
>
> drivers/dma/sh/shdma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
> index b70709b..d670b8b 100644
> --- a/drivers/dma/sh/shdma.c
> +++ b/drivers/dma/sh/shdma.c
> @@ -388,8 +388,8 @@ static size_t sh_dmae_get_partial(struct shdma_chan *schan,
> shdma_chan);
> struct sh_dmae_desc *sh_desc = container_of(sdesc,
> struct sh_dmae_desc, shdma_desc);
> - return (sh_desc->hw.tcr - sh_dmae_readl(sh_chan, TCR)) <<
> - sh_chan->xmit_shift;
> + return sh_desc->hw.tcr -
> + (sh_dmae_readl(sh_chan, TCR) << sh_chan->xmit_shift);
> }
>
> /* Called from error IRQ or NMI */
> --
> 1.7.9.5
>

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/


\
 
 \ /
  Last update: 2013-07-24 11:21    [W:0.051 / U:0.372 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site