From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Lizhi Hou <lizhi.hou@amd.com>
Cc: Louis Chauvet <louis.chauvet@bootlin.com>,
Brian Xu <brian.xu@amd.com>,
Raj Kumar Rampelli <raj.kumar.rampelli@amd.com>,
Vinod Koul <vkoul@kernel.org>,
Michal Simek <michal.simek@amd.com>,
Jan Kuliga <jankul@alatek.krakow.pl>, <dmaengine@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH 2/3] dmaengine: xilinx: xdma: Fix synchronization issue
Date: Thu, 28 Mar 2024 01:23:13 +0100 [thread overview]
Message-ID: <20240328012257.4a5955f2@xps-13> (raw)
In-Reply-To: <b59dd8cd-fd75-5342-d411-817f33e0ff48@amd.com>
Hi Lizhi,
> > @@ -376,6 +378,8 @@ static int xdma_xfer_start(struct xdma_chan *xchan)
> > return ret;
> > > xchan->busy = true;
> > + xchan->stop_requested = false;
> > + reinit_completion(&xchan->last_interrupt);
>
> If stop_requested is true, it should not start another transfer. So I would suggest to add
>
> if (xchan->stop_requested)
>
> return -ENODEV;
Maybe -EBUSY in this case?
I thought synchronize() was mandatory in-between. If that's not the
case then indeed we need to block or error-out if a new transfer
gets started.
>
> at the beginning of xdma_xfer_start().
>
> xdma_xfer_start() is protected by chan lock.
>
> > > return 0;
> > }
Thanks,
Miquèl
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-03-28 0:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 9:58 [PATCH 0/3] dmaengine: xilinx: xdma: Various fixes for xdma Louis Chauvet
2024-03-27 9:58 ` [PATCH 1/3] dmaengine: xilinx: xdma: Fix wrong offsets in the buffers addresses in dma descriptor Louis Chauvet
2024-03-27 9:58 ` [PATCH 2/3] dmaengine: xilinx: xdma: Fix synchronization issue Louis Chauvet
2024-03-27 17:46 ` Lizhi Hou
2024-03-28 0:23 ` Miquel Raynal [this message]
2024-03-28 16:49 ` Lizhi Hou
2024-03-28 1:09 ` kernel test robot
2024-03-27 9:58 ` [PATCH 3/3] dmaengine: xilinx: xdma: Clarify kdoc in XDMA driver Louis Chauvet
2024-04-07 16:38 ` [PATCH 0/3] dmaengine: xilinx: xdma: Various fixes for xdma Vinod Koul
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=20240328012257.4a5955f2@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=brian.xu@amd.com \
--cc=dmaengine@vger.kernel.org \
--cc=jankul@alatek.krakow.pl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=louis.chauvet@bootlin.com \
--cc=michal.simek@amd.com \
--cc=raj.kumar.rampelli@amd.com \
--cc=stable@vger.kernel.org \
--cc=vkoul@kernel.org \
/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).