From: Vinod Koul <vkoul@kernel.org>
To: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Cc: dan.j.williams@intel.com, michal.simek@xilinx.com,
nick.graumann@gmail.com, andrea.merello@gmail.com,
appana.durga.rao@xilinx.com, mcgrof@kernel.org,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
git@xilinx.com
Subject: Re: [PATCH] dmaengine: xilinx_dma: Reset DMA channel in dma_terminate_all
Date: Tue, 10 Dec 2019 11:31:13 +0530 [thread overview]
Message-ID: <20191210060113.GP82508@vkoul-mobl> (raw)
In-Reply-To: <1574664121-13451-1-git-send-email-radhey.shyam.pandey@xilinx.com>
On 25-11-19, 12:12, Radhey Shyam Pandey wrote:
> Reset DMA channel after stop to ensure that pending transfers and FIFOs
> in the datapath are flushed or completed. It fixes intermittent data
> verification failure reported by xilinx dma test client.
>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> ---
> drivers/dma/xilinx/xilinx_dma.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index a9c5d5c..6f1539c 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -2404,16 +2404,17 @@ static int xilinx_dma_terminate_all(struct dma_chan *dchan)
> u32 reg;
> int err;
>
> - if (chan->cyclic)
> - xilinx_dma_chan_reset(chan);
So reset is required for non cyclic cases as well now?
> -
> - err = chan->stop_transfer(chan);
> - if (err) {
> - dev_err(chan->dev, "Cannot stop channel %p: %x\n",
> - chan, dma_ctrl_read(chan, XILINX_DMA_REG_DMASR));
> - chan->err = true;
> + if (!chan->cyclic) {
> + err = chan->stop_transfer(chan);
no stop for cyclic now..?
> + if (err) {
> + dev_err(chan->dev, "Cannot stop channel %p: %x\n",
> + chan, dma_ctrl_read(chan,
> + XILINX_DMA_REG_DMASR));
> + chan->err = true;
> + }
> }
>
> + xilinx_dma_chan_reset(chan);
> /* Remove and free all of the descriptors in the lists */
> xilinx_dma_free_descriptors(chan);
> chan->idle = true;
> --
> 2.7.4
--
~Vinod
next prev parent reply other threads:[~2019-12-10 6:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-25 6:42 [PATCH] dmaengine: xilinx_dma: Reset DMA channel in dma_terminate_all Radhey Shyam Pandey
2019-12-10 6:01 ` Vinod Koul [this message]
2019-12-11 14:46 ` Radhey Shyam Pandey
2019-12-18 6:04 ` Vinod Koul
2019-12-18 13:22 ` Radhey Shyam Pandey
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=20191210060113.GP82508@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=andrea.merello@gmail.com \
--cc=appana.durga.rao@xilinx.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=git@xilinx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=michal.simek@xilinx.com \
--cc=nick.graumann@gmail.com \
--cc=radhey.shyam.pandey@xilinx.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).