mmc: block: fix partition switch failure observed during shutdown
If an RPMB request is the last request to be done before shutdown, then the card will be already switched to legacy mode as part of RPMB request handling. Later, in the shutdown handler, we get this error if we try to switch to legacy mode again. mmc0: failed to switch card to legacy mode: -74 CRs-Fixed: 935717 Change-Id: Ie75ba225412d0fecce9c98f07334b570a6cd5772 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
This commit is contained in:
parent
421d4bfa08
commit
31c01a3450
1 changed files with 11 additions and 10 deletions
|
@ -3002,18 +3002,19 @@ static void mmc_blk_cmdq_shutdown(struct mmc_queue *mq)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* disable CQ mode in card */
|
/* disable CQ mode in card */
|
||||||
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
|
if (mmc_card_cmdq(card)) {
|
||||||
EXT_CSD_CMDQ, 0,
|
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
|
||||||
card->ext_csd.generic_cmd6_time);
|
EXT_CSD_CMDQ, 0,
|
||||||
if (err) {
|
card->ext_csd.generic_cmd6_time);
|
||||||
pr_err("%s: failed to switch card to legacy mode: %d\n",
|
if (err) {
|
||||||
__func__, err);
|
pr_err("%s: failed to switch card to legacy mode: %d\n",
|
||||||
goto out;
|
__func__, err);
|
||||||
} else {
|
goto out;
|
||||||
|
}
|
||||||
mmc_card_clr_cmdq(card);
|
mmc_card_clr_cmdq(card);
|
||||||
host->cmdq_ops->disable(host, false);
|
|
||||||
host->card->cmdq_init = false;
|
|
||||||
}
|
}
|
||||||
|
host->cmdq_ops->disable(host, false);
|
||||||
|
host->card->cmdq_init = false;
|
||||||
out:
|
out:
|
||||||
mmc_host_clk_release(host);
|
mmc_host_clk_release(host);
|
||||||
mmc_put_card(card);
|
mmc_put_card(card);
|
||||||
|
|
Loading…
Add table
Reference in a new issue