Re: [PATCH v2] dma: ti: k3-udma: Fix ring_idx to pair k3 nav rings

2024-03-04 Thread Tom Rini
On Wed, Feb 21, 2024 at 07:53:44PM +0530, Udit Kumar wrote:

> ring_idx was not correctly assigned in case of tflow_id is zero.
> Which leads to wrong pairing of DMA for drivers like OSPI.
> 
> Fixes: 4312a1dfca26 ("dma: ti: k3-udma: Use ring_idx to pair k3 nav rings")
> Reviewed-by: Jai Luthra 
> Signed-off-by: Udit Kumar 

Applied to u-boot/next, thanks!

-- 
Tom


signature.asc
Description: PGP signature


[PATCH v2] dma: ti: k3-udma: Fix ring_idx to pair k3 nav rings

2024-02-21 Thread Udit Kumar
ring_idx was not correctly assigned in case of tflow_id is zero.
Which leads to wrong pairing of DMA for drivers like OSPI.

Fixes: 4312a1dfca26 ("dma: ti: k3-udma: Use ring_idx to pair k3 nav rings")
Reviewed-by: Jai Luthra 
Signed-off-by: Udit Kumar 
---
Changelog
Changes in v2
- Removed Trailing quote in subject line
- Picked Reviewed-by Tag from Jai
link to v1
https://lore.kernel.org/all/20240221072825.3645303-1-u-kum...@ti.com/

 drivers/dma/ti/k3-udma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index eea9ec9659..398668 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -884,10 +884,10 @@ static int udma_alloc_tx_resources(struct udma_chan *uc)
return ret;
 
tchan = uc->tchan;
-   if (tchan->tflow_id >= 0)
+   if (tchan->tflow_id > 0)
ring_idx = tchan->tflow_id;
else
-   ring_idx = ud->bchan_cnt + tchan->id;
+   ring_idx = tchan->id;
 
ret = k3_nav_ringacc_request_rings_pair(ud->ringacc, ring_idx, -1,
>tchan->t_ring,

base-commit: 1817afe30f1549d4d2145bd35de0427e9a7bfdfb
-- 
2.34.1