Skip to contentSkip to conversation

dmaengine: ti: k3-udma: Add missing dma_sync call for rx flush descriptor

PATCH Applied Peter Ujfalusi 2 participants 2 messages May 12, 2020 – May 15, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: ti: k3-udma: Add missing dma_sync call for rx flush descriptor

The TR mode rx flush descriptor did not had a dma_sync_single_for_device() call to make sure that the DMA see the correct information.

---
 drivers/dma/ti/k3-udma.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/dma/ti/k3-udma.c +3 -0
index 20b1f94de86c..5afd0fde4706 100644
@@ -3472,6 +3472,9 @@ static int udma_setup_rx_flush(struct udma_dev *ud)
 	tr_req->icnt0 = rx_flush->buffer_size;
 	tr_req->icnt1 = 1;
 
+	dma_sync_single_for_device(dev, hwdesc->cppi5_desc_paddr,
+				   hwdesc->cppi5_desc_size, DMA_TO_DEVICE);
+
 	/* Set up descriptor to be used for packet mode */
 	hwdesc = &rx_flush->hwdescs[1];
 	hwdesc->cppi5_desc_size = ALIGN(sizeof(struct cppi5_host_desc_t) +
Signature · 4 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
maintainer Applied
#1 lore raw
Quoted 2 lines · Peter Ujfalusi

The TR mode rx flush descriptor did not had a dma_sync_single_for_device() call to make sure that the DMA see the correct information.

Applied, thanks

Signature · 1 line
~Vinod