From: Simon Horman <horms@verge.net.au>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Olof Johansson <olof@lixom.net>,
Linux-SH <linux-sh@vger.kernel.org>,
Guennadi <g.liakhovetski@gmx.de>,
linux-kernel@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>
Subject: Re: [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error
Date: Tue, 30 Jul 2013 08:49:58 +0000 [thread overview]
Message-ID: <20130730084957.GA17209@verge.net.au> (raw)
In-Reply-To: <87bo5sv63u.wl%kuninori.morimoto.gx@renesas.com>
[ 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
>
next prev parent reply other threads:[~2013-07-30 8:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 16:02 [PATCH] dmaengine: shdma: fix a build failure on platforms with no DMA support Guennadi Liakhovetski
2013-05-30 16:23 ` Dan Murphy
2013-05-31 2:44 ` Simon Horman
2013-06-19 19:00 ` Kevin Hilman
2013-06-19 19:32 ` Guennadi Liakhovetski
2013-07-05 5:05 ` Vinod Koul
2013-07-08 7:52 ` Olof Johansson
2013-07-08 7:33 ` Vinod Koul
2013-07-10 2:09 ` Simon Horman
2013-07-08 8:13 ` Guennadi Liakhovetski
2013-07-10 2:09 ` Simon Horman
2013-07-16 1:20 ` Simon Horman
2013-07-23 2:39 ` Olof Johansson
2013-07-23 4:12 ` Simon Horman
[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 [this message]
2013-07-30 9:22 ` Guennadi Liakhovetski
2013-07-31 0:52 ` Simon Horman
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=20130730084957.GA17209@verge.net.au \
--to=horms@verge.net.au \
--cc=g.liakhovetski@gmx.de \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=olof@lixom.net \
--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;
as well as URLs for NNTP newsgroup(s).