From: Louis Chauvet <louis.chauvet@bootlin.com>
To: Lizhi Hou <lizhi.hou@amd.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>
Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, markus.elfring@web.de,
stable@vger.kernel.org,
Louis Chauvet <louis.chauvet@bootlin.com>
Subject: [PATCH v2] dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr()
Date: Fri, 07 Jun 2024 10:34:38 +0200 [thread overview]
Message-ID: <20240607-xdma-fixes-v2-1-0282319ce345@bootlin.com> (raw)
Requests the vchan lock before using xdma->stop_request.
Fixes: 6a40fb824596 ("dmaengine: xilinx: xdma: Fix synchronization issue")
Cc: stable@vger.kernel.org
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
Changes in v2:
- Apply comments from Markus
- Link to v1: https://lore.kernel.org/r/20240527-xdma-fixes-v1-1-f31434b56842@bootlin.com
---
drivers/dma/xilinx/xdma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index e143a7330816..718842fdaf98 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -885,11 +885,11 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
u32 st;
bool repeat_tx;
+ spin_lock(&xchan->vchan.lock);
+
if (xchan->stop_requested)
complete(&xchan->last_interrupt);
- spin_lock(&xchan->vchan.lock);
-
/* get submitted request */
vd = vchan_next_desc(&xchan->vchan);
if (!vd)
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240527-xdma-fixes-74bbe2dcbeb8
Best regards,
--
Louis Chauvet <louis.chauvet@bootlin.com>
next reply other threads:[~2024-06-07 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 8:34 Louis Chauvet [this message]
2024-06-07 11:00 ` [PATCH v2] dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr() Markus Elfring
2024-06-07 12:23 ` Markus Elfring
2024-06-07 17:47 ` 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=20240607-xdma-fixes-v2-1-0282319ce345@bootlin.com \
--to=louis.chauvet@bootlin.com \
--cc=brian.xu@amd.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=markus.elfring@web.de \
--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