In CQ mode, the legacy commands will be sent after CQ is
put in halt state. But when deferred resume is enabled,
the resume happens in mmc_wait_for_req(), which will enable
CQ again overiding the caller's state. This causes legacy
commands to fail. Fix this by moving the deferred resume
from all the places to mmc_get_card() which is always the
first step done in both CQ/legacy commands and thus avoids
the above issue scneario.
Change-Id: I432e89f3221615dd644412f481d17f840c75e407
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
mmc_get_card(card);
-#ifdef CONFIG_MMC_BLOCK_DEFERRED_RESUME
- if (mmc_bus_needs_resume(card->host))
- mmc_resume_bus(card->host);
-#endif
if (!card->host->cmdq_ctx.active_reqs && mmc_card_doing_bkops(card)) {
ret = mmc_cmdq_halt(card->host, true);
if (ret)
{
pm_runtime_get_sync(&card->dev);
mmc_claim_host(card->host);
+#ifdef CONFIG_MMC_BLOCK_DEFERRED_RESUME
+ if (mmc_bus_needs_resume(card->host))
+ mmc_resume_bus(card->host);
+#endif
}
EXPORT_SYMBOL(mmc_get_card);