aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShiraz Hashim <shiraz.hashim@st.com>2012-11-09 15:26:29 +0000
committerVinod Koul <vinod.koul@intel.com>2013-01-07 22:05:07 -0800
commit5e034f7b659be9d94e64aaaa985ab530dd847fdb (patch)
tree2d26d8d83035a199d8f773f9bc66562713387133
parentdma: sh: Don't use ENODEV for failing slave lookup (diff)
downloadlinux-dev-5e034f7b659be9d94e64aaaa985ab530dd847fdb.tar.xz
linux-dev-5e034f7b659be9d94e64aaaa985ab530dd847fdb.zip
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>
-rw-r--r--drivers/dma/dmatest.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 99a75e5d66be..a2c8904b63ea 100644
--- a/drivers/dma/dmatest.c
+++ b/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);