Skip to content

Commit

Permalink
dmaengine/dmatest: terminate transfers only in case of errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shiraz Hashim authored and Vinod Koul committed Jan 8, 2013
1 parent 7c1119b commit 5e034f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/dma/dmatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@ static int dmatest_func(void *data)
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);
Expand Down

0 comments on commit 5e034f7

Please sign in to comment.