]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
dmaengine/dmatest: terminate transfers only in case of errors
authorShiraz Hashim <shiraz.hashim@st.com>
Fri, 9 Nov 2012 15:26:29 +0000 (15:26 +0000)
committerVinod Koul <vinod.koul@intel.com>
Tue, 8 Jan 2013 06:05:07 +0000 (22:05 -0800)
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>
drivers/dma/dmatest.c

index 99a75e5d66be4a5a0bfe12f8a9b51a51fe9805e1..a2c8904b63ea44fd9154631170c391bd601054d2 100644 (file)
@@ -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);