Commit 4117e897 authored by Adrian Hunter's avatar Adrian Hunter Committed by Greg Kroah-Hartman

mmc: mmc_test: Ensure command queue is disabled for testing


[ Upstream commit 23a18525 ]

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: 9d4579a8 ("mmc: mmc_test: Disable Command Queue while mmc_test is used")
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b45ccc79
...@@ -2328,10 +2328,17 @@ static int mmc_test_reset(struct mmc_test_card *test) ...@@ -2328,10 +2328,17 @@ static int mmc_test_reset(struct mmc_test_card *test)
int err; int err;
err = mmc_hw_reset(host); err = mmc_hw_reset(host);
if (!err) if (!err) {
/*
* Reset will re-enable the card's command queue, but tests
* expect it to be disabled.
*/
if (card->ext_csd.cmdq_en)
mmc_cmdq_disable(card);
return RESULT_OK; return RESULT_OK;
else if (err == -EOPNOTSUPP) } else if (err == -EOPNOTSUPP) {
return RESULT_UNSUP_HOST; return RESULT_UNSUP_HOST;
}
return RESULT_FAIL; return RESULT_FAIL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment