From: Shiraz Hashim Date: Fri, 9 Nov 2012 15:26:29 +0000 (+0000) Subject: dmaengine/dmatest: terminate transfers only in case of errors X-Git-Tag: v3.9-rc1~80^2~62 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=5e034f7b659be9d94e64aaaa985ab530dd847fdb;p=~emulex%2Finfiniband.git 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 Signed-off-by: Deepak Sikri Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 99a75e5d66b..a2c8904b63e 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);