aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSinan Kaya <okaya@codeaurora.org>2016-10-07 01:25:14 -0400
committerVinod Koul <vinod.koul@intel.com>2016-10-19 09:33:06 -0400
commitfc737969f645c1cbb1d167604eb7082fe18809c4 (patch)
tree4955b608d42fc7019ee3168c605d9db8030fd958
parentd3eab504d44803147d94de8f8e1baf3f6f5645f1 (diff)
dmaengine: qcom_hidma: break completion processing on error
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 <okaya@codeaurora.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/qcom/hidma_ll.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/qcom/hidma_ll.c b/drivers/dma/qcom/hidma_ll.c
index 132d29eb9a63..e605c9096545 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)
291 evre_write_off = 291 evre_write_off =
292 readl_relaxed(lldev->evca + HIDMA_EVCA_WRITE_PTR_REG); 292 readl_relaxed(lldev->evca + HIDMA_EVCA_WRITE_PTR_REG);
293 num_completed++; 293 num_completed++;
294
295 /*
296 * An error interrupt might have arrived while we are processing
297 * the completed interrupt.
298 */
299 if (!hidma_ll_isenabled(lldev))
300 break;
294 } 301 }
295 302
296 if (num_completed) { 303 if (num_completed) {