]> git.baikalelectronics.ru Git - uboot.git/commit
dma: ti: k3-udma: Fix channel hang on teardown
authorVignesh Raghavendra <vigneshr@ti.com>
Wed, 8 Mar 2023 04:12:57 +0000 (09:42 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 22 Mar 2023 16:51:15 +0000 (12:51 -0400)
commit29aa53608a0253e9e6ca8e3644ebb95f71a800de
treec06d3e7309022a299855ac566ba51f3fb38b0007
parented8de23af2ce21d7d6bb371e158b5d4f1c608ad1
dma: ti: k3-udma: Fix channel hang on teardown

Setting RX flow error handling will stall the channel until descriptors
are available to move RX data. Setting this bit causes issues when
tearing down ethernet DMA channel at the end of TFTP transfer as
unrelated network packets can cause teardown to stall indefinitely waiting
for driver to queue add more desc leading to channel hang with error
logs:
udma_stop_dev2mem TIMEOUT !
udma_stop_dev2mem: peer not stopped TIMEOUT !
udma_stop_dev2mem TIMEOUT !

Fix this by clearing rx_error_handling similar to how its done for UDMA
as part of udma_alloc_rchan_sci_req()

This fixes occasional TFTP Failures seen when downloading multiple files
one after the other on AM64/AM62 SoCs.

Fixes: 1dfb71468d59 ("dma: ti: k3-udma: Add BCDMA and PKTDMA support")
Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
drivers/dma/ti/k3-udma.c