mmc: block: Fix issue with deferred resume when CQ is enabled
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>
This commit is contained in:
parent
3162449f7d
commit
15c8f04a46
2 changed files with 4 additions and 4 deletions
|
@ -3849,10 +3849,6 @@ static int mmc_blk_cmdq_issue_rq(struct mmc_queue *mq, struct request *req)
|
||||||
|
|
||||||
mmc_get_card(card);
|
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)) {
|
if (!card->host->cmdq_ctx.active_reqs && mmc_card_doing_bkops(card)) {
|
||||||
ret = mmc_cmdq_halt(card->host, true);
|
ret = mmc_cmdq_halt(card->host, true);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -2128,6 +2128,10 @@ void mmc_get_card(struct mmc_card *card)
|
||||||
{
|
{
|
||||||
pm_runtime_get_sync(&card->dev);
|
pm_runtime_get_sync(&card->dev);
|
||||||
mmc_claim_host(card->host);
|
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);
|
EXPORT_SYMBOL(mmc_get_card);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue