dmaengine: ti: k3-udma: Fix terminated transfer handling
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 14 Feb 2020 09:14:41 +0000 (11:14 +0200)
committerVinod Koul <vkoul@kernel.org>
Wed, 19 Feb 2020 07:39:11 +0000 (13:09 +0530)
commit8390318c04bb24cc4d41ac03e009b0748882f99f
tree7c7bdc823d1099e22613973a917998b9281584b1
parentc7450bb211f3ded7cb6e4d305855683ed7d04e60
dmaengine: ti: k3-udma: Fix terminated transfer handling

When we receive back the descriptor of the terminated transfer the cookie
must be marked as completed to make sure that the accounting is correct.

In udma_tx_status() the status should be marked as completed if the channel
is no longer running (it can only happen if the channel is not yet started
for the first time, or after a channel termination).

Fixes: 25dcb5dd7b7ce ("dmaengine: ti: New driver for K3 UDMA")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200214091441.27535-7-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/k3-udma.c