Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: mmc_test: Ensure command queue is disabled for testing

mmc_test disables the command queue because none of the tests use the
command queue. However the Reset Test will re-enable it, so disable it in
that case too.

Fixes: 9d4579a85c84 ("mmc: mmc_test: Disable Command Queue while mmc_test is used")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Adrian Hunter and committed by
Ulf Hansson
23a18525 d2383318

+9 -2
+9 -2
drivers/mmc/core/mmc_test.c
··· 2320 2320 int err; 2321 2321 2322 2322 err = mmc_hw_reset(host); 2323 - if (!err) 2323 + if (!err) { 2324 + /* 2325 + * Reset will re-enable the card's command queue, but tests 2326 + * expect it to be disabled. 2327 + */ 2328 + if (card->ext_csd.cmdq_en) 2329 + mmc_cmdq_disable(card); 2324 2330 return RESULT_OK; 2325 - else if (err == -EOPNOTSUPP) 2331 + } else if (err == -EOPNOTSUPP) { 2326 2332 return RESULT_UNSUP_HOST; 2333 + } 2327 2334 2328 2335 return RESULT_FAIL; 2329 2336 }