1
0
Fork 0

dmaengine: dmatest: Restore default for channel

commit 6b41030fdc 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: d53513d5dc ("dmaengine: dmatest: Add support for multi channel testing)
Reported-by: Dijil Mohan <Dijil.Mohan@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Link: https://lore.kernel.org/r/20200429071522.58148-1-vladimir.murzin@arm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Vladimir Murzin 2020-04-29 08:15:22 +01:00 committed by Greg Kroah-Hartman
parent 57c32a52c3
commit 0fcbe108b0
1 changed files with 5 additions and 4 deletions

View File

@ -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);
}