Skip to content

Commit

Permalink
dmaengine: dmatest: Restore default for channel
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1881178

commit 6b41030 upstream.

In case of dmatest is built-in and no channel was configured test
doesn't run with:

dmatest: Could not start test, no channels configured

Even though description to "channel" parameter claims that default is
any.

Add default channel back as it used to be rather than reject test with
no channel configuration.

Fixes: d53513d ("dmaengine: dmatest: Add support for multi channel testing)
Reported-by: Dijil Mohan <[email protected]>
Signed-off-by: Vladimir Murzin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Kamal Mostafa <[email protected]>
Signed-off-by: Khalid Elmously <[email protected]>
  • Loading branch information
Vladimir Murzin authored and marcelocerri committed Jun 22, 2020
1 parent b29290c commit 495af93
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/dma/dmatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,10 +1166,11 @@ static int dmatest_run_set(const char *val, const struct kernel_param *kp)
mutex_unlock(&info->lock);
return ret;
} else if (dmatest_run) {
if (is_threaded_test_pending(info))
start_threaded_tests(info);
else
pr_info("Could not start test, no channels configured\n");
if (!is_threaded_test_pending(info)) {
pr_info("No channels configured, continue with any\n");
add_threaded_test(info);
}
start_threaded_tests(info);
} else {
stop_threaded_test(info);
}
Expand Down

0 comments on commit 495af93

Please sign in to comment.