Skip to content

Commit efab258

Browse files
jayesh-tivinodkoul
authored andcommitted
dmaengine: ti: k3-udma: Do conditional decrement of UDMA_CHAN_RT_PEER_BCNT_REG
PSIL_EP_NATIVE endpoints may not have PEER registers for BCNT and thus udma_decrement_byte_counters() should not try to decrement these counters. This fixes the issue of crypto IPERF testing where the client side (EVM) hangs without transfer of packets to the server side, seen since this function was added. Fixes: 7c94dcf ("dmaengine: ti: k3-udma: Reset UDMA_CHAN_RT byte counters to prevent overflow") Signed-off-by: Jayesh Choudhary <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 6744a03 commit efab258

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/dma/ti/k3-udma.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,11 +762,12 @@ static void udma_decrement_byte_counters(struct udma_chan *uc, u32 val)
762762
if (uc->desc->dir == DMA_DEV_TO_MEM) {
763763
udma_rchanrt_write(uc, UDMA_CHAN_RT_BCNT_REG, val);
764764
udma_rchanrt_write(uc, UDMA_CHAN_RT_SBCNT_REG, val);
765-
udma_rchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val);
765+
if (uc->config.ep_type != PSIL_EP_NATIVE)
766+
udma_rchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val);
766767
} else {
767768
udma_tchanrt_write(uc, UDMA_CHAN_RT_BCNT_REG, val);
768769
udma_tchanrt_write(uc, UDMA_CHAN_RT_SBCNT_REG, val);
769-
if (!uc->bchan)
770+
if (!uc->bchan && uc->config.ep_type != PSIL_EP_NATIVE)
770771
udma_tchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val);
771772
}
772773
}

0 commit comments

Comments
 (0)