Thread (15 messages) 15 messages, 4 authors, 2016-10-19
STALE3519d
Revisions (4)
  1. v1 [diff vs current]
  2. v4 [diff vs current]
  3. v5 current
  4. v6 [diff vs current]

[PATCH V5 09/10] dmaengine: qcom_hidma: break completion processing on error

From: Sinan Kaya <hidden>
Date: 2016-10-07 05:36:58
Also in: linux-arm-msm, linux-devicetree, lkml
Subsystem: arm/qualcomm mailing list, dma generic offload engine subsystem, qualcomm hidma driver, the rest · Maintainers: Vinod Koul, Sinan Kaya, Linus Torvalds

We try to consume as much successful transfers as possible. Now that we
support MSI interrupts, an error interrupt might be observed by another
processor while we are finishing the successful ones.

Try to abort successful processing if this is the case.

Signed-off-by: Sinan Kaya <redacted>
---
 drivers/dma/qcom/hidma_ll.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/drivers/dma/qcom/hidma_ll.c b/drivers/dma/qcom/hidma_ll.c
index c4e8b64..aa76ec1 100644
--- a/drivers/dma/qcom/hidma_ll.c
+++ b/drivers/dma/qcom/hidma_ll.c
@@ -291,6 +291,13 @@ static int hidma_handle_tre_completion(struct hidma_lldev *lldev)
 		evre_write_off =
 		    readl_relaxed(lldev->evca + HIDMA_EVCA_WRITE_PTR_REG);
 		num_completed++;
+
+		/*
+		 * An error interrupt might have arrived while we are processing
+		 * the completed interrupt.
+		 */
+		if (!hidma_ll_isenabled(lldev))
+			break;
 	}
 
 	if (num_completed) {
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help