summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-06-14 09:57:05 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-06-14 09:57:04 -0700
commit621d21a88ecf495c80f6327c2f9db6f1b2dea6db (patch)
tree48e8ea111a57ea2b6b70d4431ac9875bcc1de45e
parentb0102088df341694a633429794d95a099c824fb0 (diff)
parent3934c3777207328ff886e73297e9093028ad6a2d (diff)
Merge "mmc: core: Ignore CRC errors with CMD13 while executing tuning"
-rw-r--r--drivers/mmc/core/host.c2
-rw-r--r--drivers/mmc/host/sdhci.c6
-rw-r--r--include/linux/mmc/host.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 9ca73a2b86db..ae54302be8fd 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -327,6 +327,7 @@ void mmc_retune_enable(struct mmc_host *host)
mod_timer(&host->retune_timer,
jiffies + host->retune_period * HZ);
}
+EXPORT_SYMBOL(mmc_retune_enable);
void mmc_retune_disable(struct mmc_host *host)
{
@@ -335,6 +336,7 @@ void mmc_retune_disable(struct mmc_host *host)
host->retune_now = 0;
host->need_retune = 0;
}
+EXPORT_SYMBOL(mmc_retune_disable);
void mmc_retune_timer_stop(struct mmc_host *host)
{
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 40a34c283955..ddb9947ce298 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2418,7 +2418,13 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
if (host->ops->platform_execute_tuning) {
spin_unlock_irqrestore(&host->lock, flags);
+ /*
+ * Make sure re-tuning won't get triggered for the CRC errors
+ * occurred while executing tuning
+ */
+ mmc_retune_disable(mmc);
err = host->ops->platform_execute_tuning(host, opcode);
+ mmc_retune_enable(mmc);
sdhci_runtime_pm_put(host);
return err;
}
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 279411c42ded..aea4c0f2ef5f 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -823,6 +823,8 @@ static inline bool mmc_card_hs400(struct mmc_card *card)
return card->host->ios.timing == MMC_TIMING_MMC_HS400;
}
+void mmc_retune_enable(struct mmc_host *host);
+void mmc_retune_disable(struct mmc_host *host);
void mmc_retune_timer_stop(struct mmc_host *host);
static inline void mmc_retune_needed(struct mmc_host *host)