[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191202203128.14348-3-peter.ujfalusi@ti.com>
Date: Mon, 2 Dec 2019 22:31:27 +0200
From: Peter Ujfalusi <peter.ujfalusi@...com>
To: <vkoul@...nel.org>
CC: <dan.j.williams@...el.com>, <dmaengine@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <grygorii.strashko@...com>,
<t-kristo@...com>, <tony@...mide.com>, <vigneshr@...com>
Subject: [PATCH 2/3] dmaengine: ti: k3-udma: Workaround for stale transfers
If the client does issue_pending between terminte_all+synchronize and
free_chan_resources, we need to make sure that it has been handled and
cleared up.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
---
drivers/dma/ti/k3-udma.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 1b929f7a84d4..3aede5db9604 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -2842,6 +2842,10 @@ static void udma_free_chan_resources(struct dma_chan *chan)
struct udma_dev *ud = to_udma_dev(chan->device);
udma_terminate_all(chan);
+ if (uc->terminated_desc) {
+ udma_reset_chan(uc, false);
+ udma_reset_rings(uc);
+ }
if (uc->irq_num_ring > 0) {
free_irq(uc->irq_num_ring, uc);
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists