diff options
author | Shiraz Hashim <shiraz.hashim@st.com> | 2012-11-09 10:26:29 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-01-08 01:05:07 -0500 |
commit | 5e034f7b659be9d94e64aaaa985ab530dd847fdb (patch) | |
tree | 2d26d8d83035a199d8f773f9bc66562713387133 | |
parent | 7c1119bdd650fa58dad8157bc75c5fcf6ed97843 (diff) |
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.c | 4 |
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: | |||
536 | thread_name, total_tests, failed_tests, ret); | 536 | thread_name, total_tests, failed_tests, ret); |
537 | 537 | ||
538 | /* terminate all transfers on specified channels */ | 538 | /* terminate all transfers on specified channels */ |
539 | dmaengine_terminate_all(chan); | 539 | if (ret) |
540 | dmaengine_terminate_all(chan); | ||
541 | |||
540 | if (iterations > 0) | 542 | if (iterations > 0) |
541 | while (!kthread_should_stop()) { | 543 | while (!kthread_should_stop()) { |
542 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit); | 544 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit); |