From: Lizhi Hou <lizhi.hou@amd.com>
To: Miquel Raynal <miquel.raynal@bootlin.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 09:49:29 -0700 [thread overview]
Message-ID: <fd6ef776-d861-0dc7-2809-27868ca894e3@amd.com> (raw)
In-Reply-To: <20240328012257.4a5955f2@xps-13>
On 3/27/24 17:23, Miquel Raynal wrote:
> 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.
Okay. It looks issue_pending is not expected between terminate_all() and
synchronize().
This check is not needed.
Thanks,
Lizhi
>
>> at the beginning of xdma_xfer_start().
>>
>> xdma_xfer_start() is protected by chan lock.
>>
>>> > return 0;
>>> }
> Thanks,
> Miquèl
WARNING: multiple messages have this Message-ID (diff)
From: Lizhi Hou <lizhi.hou@amd.com>
To: Miquel Raynal <miquel.raynal@bootlin.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 09:49:29 -0700 [thread overview]
Message-ID: <fd6ef776-d861-0dc7-2809-27868ca894e3@amd.com> (raw)
In-Reply-To: <20240328012257.4a5955f2@xps-13>
On 3/27/24 17:23, Miquel Raynal wrote:
> 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.
Okay. It looks issue_pending is not expected between terminate_all() and
synchronize().
This check is not needed.
Thanks,
Lizhi
>
>> 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 16:49 UTC|newest]
Thread overview: 19+ 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 ` 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 ` Louis Chauvet
2024-03-27 9:58 ` [PATCH 2/3] dmaengine: xilinx: xdma: Fix synchronization issue Louis Chauvet
2024-03-27 9:58 ` Louis Chauvet
2024-03-27 17:46 ` Lizhi Hou
2024-03-27 17:46 ` Lizhi Hou
2024-03-28 0:23 ` Miquel Raynal
2024-03-28 0:23 ` Miquel Raynal
2024-03-28 16:49 ` Lizhi Hou [this message]
2024-03-28 16:49 ` Lizhi Hou
2024-03-28 1:09 ` kernel test robot
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-03-27 9:58 ` Louis Chauvet
2024-03-27 10:01 ` kernel test robot
2024-04-07 16:38 ` [PATCH 0/3] dmaengine: xilinx: xdma: Various fixes for xdma Vinod Koul
2024-04-07 16:38 ` 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=fd6ef776-d861-0dc7-2809-27868ca894e3@amd.com \
--to=lizhi.hou@amd.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=louis.chauvet@bootlin.com \
--cc=michal.simek@amd.com \
--cc=miquel.raynal@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.