Hold re-tuning during bkops to prevent it from conflicting with the busy state. Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> --- drivers/mmc/core/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 91838ea..392a150 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -311,6 +311,10 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception) } else { timeout = 0; use_busy_signal = false; + /* Hold re-tuning for ongoing bkops */ + err = mmc_retune_and_hold(card->host); + if (err) + goto out; } err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, @@ -319,6 +323,9 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception) if (err) { pr_warn("%s: Error %d starting bkops\n", mmc_hostname(card->host), err); + /* bkops not ongoing, so release re-tuning */ + if (!use_busy_signal) + mmc_retune_release(card->host); goto out; } @@ -753,6 +760,7 @@ int mmc_stop_bkops(struct mmc_card *card) */ if (!err || (err == -EINVAL)) { mmc_card_clr_doing_bkops(card); + mmc_retune_release(card->host); err = 0; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html