Skip to content

Commit 462237d

Browse files
Fomysvinodkoul
authored andcommitted
dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr()
Requests the vchan lock before using xdma->stop_request. Fixes: 6a40fb8 ("dmaengine: xilinx: xdma: Fix synchronization issue") Cc: [email protected] Signed-off-by: Louis Chauvet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1613e60 commit 462237d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/xilinx/xdma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,11 +885,11 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
885885
u32 st;
886886
bool repeat_tx;
887887

888+
spin_lock(&xchan->vchan.lock);
889+
888890
if (xchan->stop_requested)
889891
complete(&xchan->last_interrupt);
890892

891-
spin_lock(&xchan->vchan.lock);
892-
893893
/* get submitted request */
894894
vd = vchan_next_desc(&xchan->vchan);
895895
if (!vd)

0 commit comments

Comments
 (0)