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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index d4e3248..f8ae793 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -316,6 +316,8 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception) } else { timeout = 0; use_busy_signal = false; + /* Hold re-tuning for ongoing bkops */ + mmc_retune_hold(card->host); } err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, @@ -324,6 +326,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; } @@ -749,6 +754,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