Browse Source

dmaengine/dmatest: terminate transfers only in case of errors

dmatest erroneously terminated transfers in normal cases also leading to
test failures for multiple threads over a channel. Fix this and
terminate transfers only in case of errors.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Shiraz Hashim 12 years ago
parent
commit
5e034f7b65
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/dma/dmatest.c

+ 3 - 1
drivers/dma/dmatest.c

@@ -536,7 +536,9 @@ err_srcs:
 			thread_name, total_tests, failed_tests, ret);
 
 	/* terminate all transfers on specified channels */
-	dmaengine_terminate_all(chan);
+	if (ret)
+		dmaengine_terminate_all(chan);
+
 	if (iterations > 0)
 		while (!kthread_should_stop()) {
 			DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit);