dmaengine: dmatest: Prevent to run on misconfigured channel
authorVladimir Murzin <vladimir.murzin@arm.com>
Tue, 22 Sep 2020 11:58:45 +0000 (14:58 +0300)
committerVinod Koul <vkoul@kernel.org>
Tue, 22 Sep 2020 14:48:05 +0000 (20:18 +0530)
commitce65d55f92a67e247f4d799e581cf9fed677871c
treea1367f338f04e2bacddc04c341ce26b053deb65f
parentf4d51dffc6c01a9e94650d95ce0104964f8ae822
dmaengine: dmatest: Prevent to run on misconfigured channel

Andy reported that commit 6b41030fdc79 ("dmaengine: dmatest:
Restore default for channel") broke his scripts for the case
where "busy" channel is used for configuration with expectation
that run command would do nothing. Instead, behavior was
(unintentionally) changed to treat such case as under-configuration
and progress with defaults, i.e. run command would start a test
with default setting for channel (which would use all channels).

Restore original behavior with tracking status of channel setter
so we can distinguish between misconfigured and under-configured
cases in run command and act accordingly.

Fixes: 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel")
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200922115847.30100-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dmatest.c