diff mbox series

[RESEND,2/2] : IRQ Pending signal's state leaved true once stopped

Message ID CALYqZ9k3xtoLBUaaqhuzz4cebWnDyScobxA06uzk4Gg6vM2OEQ@mail.gmail.com (mailing list archive)
State New
Headers show
Series [RESEND,1/2] : Fix DMAR Error NO_PASID when IOMMU is enabled | expand

Commit Message

Eric Debief May 22, 2024, 12:12 p.m. UTC
Hi,

We've observed that the IRQ Pending signal's state stays TRUE once the
XDMA channel is stopped. This is due to the missg acknowledgement
(stats register read) on the last interrupt.
We simply move up the status register read.

Below my patch (corrected).

Hope this helps.
Eric.

From b57bd089b85db6ff65a01e126f104fedb223f04b Mon Sep 17 00:00:00 2001
From: Eric DEBIEF <debief@digigram.com>
Date: Wed, 22 May 2024 12:35:57 +0200
Subject: FIX: IRQ Pending TRUE once the transfer is stopped.

The last interrupt is not acknowledged so the IRQ Pending signal
is HIGH.
Move up the read of the status register to ack the IRQ.
Thus the IRQ Pending signal is lowered.

Signed-off-by: Eric DEBIEF <debief@digigram.com>
---
 drivers/dma/xilinx/xdma.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--
2.34.1
diff mbox series

Patch

diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index 9ae615165cb6..9064793f5d18 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -926,16 +926,16 @@  static irqreturn_t xdma_channel_isr(int irq, void *dev_id)

     spin_lock(&xchan->vchan.lock);

-    /* get submitted request */
-    vd = vchan_next_desc(&xchan->vchan);
-    if (!vd)
-        goto out;
-
     /* Clear-on-read the status register */
     ret = regmap_read(xdev->rmap, xchan->base + XDMA_CHAN_STATUS_RC, &st);
     if (ret)
         goto out;

+    /* get submitted request */
+    vd = vchan_next_desc(&xchan->vchan);
+    if (!vd)
+        goto out;
+
     desc = to_xdma_desc(vd);

     st &= XDMA_CHAN_STATUS_MASK;