]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: core: Hold re-tuning during erase commands
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 7 May 2015 10:10:16 +0000 (13:10 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Jun 2015 07:06:55 +0000 (09:06 +0200)
Hold re-tuning during erase commands to prevent
it from conflicting with the sequence of commands.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c

index ec3453fd39aa3c33fa22720d9b6c655172aad4d0..ff1e38400dc58778dd8415fe6a73d8cff37e9930 100644 (file)
@@ -1995,6 +1995,8 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
        unsigned long timeout;
        int err;
 
+       mmc_retune_hold(card->host);
+
        /*
         * qty is used to calculate the erase timeout which depends on how many
         * erase groups (or allocation units in SD terminology) are affected.
@@ -2098,6 +2100,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
        } while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
                 (R1_CURRENT_STATE(cmd.resp[0]) == R1_STATE_PRG));
 out:
+       mmc_retune_release(card->host);
        return err;
 }