* [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error [not found] ` <87d2q8v6fs.wl%kuninori.morimoto.gx@renesas.com> @ 2013-07-24 6:12 ` Kuninori Morimoto 2013-07-24 8:43 ` Guennadi Liakhovetski 2013-07-30 8:49 ` Simon Horman 0 siblings, 2 replies; 6+ messages in thread From: Kuninori Morimoto @ 2013-07-24 6:12 UTC (permalink / raw) To: Olof Johansson; +Cc: Simon Horman, Linux-SH, Guennadi, linux-kernel 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> --- >> 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error 2013-07-24 6:12 ` [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error Kuninori Morimoto @ 2013-07-24 8:43 ` Guennadi Liakhovetski 2013-07-26 2:38 ` Simon Horman 2013-07-30 8:49 ` Simon Horman 1 sibling, 1 reply; 6+ messages in thread From: Guennadi Liakhovetski @ 2013-07-24 8:43 UTC (permalink / raw) To: Kuninori Morimoto; +Cc: Olof Johansson, Simon Horman, Linux-SH, linux-kernel 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/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error 2013-07-24 8:43 ` Guennadi Liakhovetski @ 2013-07-26 2:38 ` Simon Horman 0 siblings, 0 replies; 6+ messages in thread From: Simon Horman @ 2013-07-26 2:38 UTC (permalink / raw) To: Guennadi Liakhovetski Cc: Kuninori Morimoto, Olof Johansson, Linux-SH, linux-kernel On Wed, Jul 24, 2013 at 10:43:44AM +0200, Guennadi Liakhovetski wrote: > 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, I will queue this up for v3.11 in the fixes-for-v3.11 branch. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error 2013-07-24 6:12 ` [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error Kuninori Morimoto 2013-07-24 8:43 ` Guennadi Liakhovetski @ 2013-07-30 8:49 ` Simon Horman 2013-07-30 9:22 ` Guennadi Liakhovetski 1 sibling, 1 reply; 6+ messages in thread From: Simon Horman @ 2013-07-30 8:49 UTC (permalink / raw) To: Kuninori Morimoto Cc: Olof Johansson, Linux-SH, Guennadi, linux-kernel, Vinod Koul [ Cc Vinod ] On Tue, Jul 23, 2013 at 11:12:41PM -0700, 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> Can I confirm that this was a regression introduced by 4f46f8ac80416b0e8fd3aba6a0d842205fb29140 ("dmaengine: shdma: restore partial transfer calculation") ? > --- > >> 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 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-sh" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error 2013-07-30 8:49 ` Simon Horman @ 2013-07-30 9:22 ` Guennadi Liakhovetski 2013-07-31 0:52 ` Simon Horman 0 siblings, 1 reply; 6+ messages in thread From: Guennadi Liakhovetski @ 2013-07-30 9:22 UTC (permalink / raw) To: Simon Horman Cc: Kuninori Morimoto, Olof Johansson, Linux-SH, linux-kernel, Vinod Koul Hi Simon On Tue, 30 Jul 2013, Simon Horman wrote: > [ Cc Vinod ] > > On Tue, Jul 23, 2013 at 11:12:41PM -0700, 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> > > Can I confirm that this was a regression introduced by > 4f46f8ac80416b0e8fd3aba6a0d842205fb29140 > ("dmaengine: shdma: restore partial transfer calculation") ? No, don't think so. That patch only restores what was accidentally deleted from the driver before. So, you cannot say, that before that patch the calculation was correct. And even the way it restores it was already wrong before. The error goes back to the original implementation: commit c014906a870ce70e009def0c9d170ccabeb0be63 Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Date: Thu Feb 18 16:30:02 2010 +0000 dmaengine: shdma: extend .device_terminate_all() to record partial transfer 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 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-sh" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error 2013-07-30 9:22 ` Guennadi Liakhovetski @ 2013-07-31 0:52 ` Simon Horman 0 siblings, 0 replies; 6+ messages in thread From: Simon Horman @ 2013-07-31 0:52 UTC (permalink / raw) To: Guennadi Liakhovetski Cc: Kuninori Morimoto, Olof Johansson, Linux-SH, linux-kernel, Vinod Koul On Tue, Jul 30, 2013 at 11:22:31AM +0200, Guennadi Liakhovetski wrote: > Hi Simon > > On Tue, 30 Jul 2013, Simon Horman wrote: > > > [ Cc Vinod ] > > > > On Tue, Jul 23, 2013 at 11:12:41PM -0700, 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> > > > > Can I confirm that this was a regression introduced by > > 4f46f8ac80416b0e8fd3aba6a0d842205fb29140 > > ("dmaengine: shdma: restore partial transfer calculation") ? > > No, don't think so. That patch only restores what was accidentally deleted > from the driver before. So, you cannot say, that before that patch the > calculation was correct. And even the way it restores it was already wrong > before. The error goes back to the original implementation: > > commit c014906a870ce70e009def0c9d170ccabeb0be63 > Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de> > Date: Thu Feb 18 16:30:02 2010 +0000 > > dmaengine: shdma: extend .device_terminate_all() to record partial transfer Thanks, I will add the following to the changelog: This bug has been present since c014906a870ce70e009def0c9d170ccabeb0be63 ("dmaengine: shdma: extend .device_terminate_all() to record partial transfer"), which was added in 2.6.34-rc1. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-31 0:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1373422152-29976-1-git-send-email-horms+renesas@verge.net.au>
[not found] ` <20130716012041.GA942@verge.net.au>
[not found] ` <20130723023907.GC14983@quad.lixom.net>
[not found] ` <20130723041220.GA22253@verge.net.au>
[not found] ` <87zjtddgtg.wl%kuninori.morimoto.gx@renesas.com>
[not found] ` <20130724034009.GA18355@verge.net.au>
[not found] ` <87d2q8v6fs.wl%kuninori.morimoto.gx@renesas.com>
2013-07-24 6:12 ` [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error Kuninori Morimoto
2013-07-24 8:43 ` Guennadi Liakhovetski
2013-07-26 2:38 ` Simon Horman
2013-07-30 8:49 ` Simon Horman
2013-07-30 9:22 ` Guennadi Liakhovetski
2013-07-31 0:52 ` Simon Horman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox