Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5fa9a0f authored by Veerabhadrarao Badiganti's avatar Veerabhadrarao Badiganti Committed by Gerrit - the friendly Code Review server
Browse files

mmc: core: Ignore CRC errors with CMD13 while executing tuning



While executing tuning in case CMD19 fails, the driver sends CMD13
multiple times to ensure the card is ready to receive the next tuning
command. If this status command fails with CRC error, it will trigger
tuning. This will result in back to back tuning multiple times.

To avoid this situation, ignore CRCs error generated with CMD13 while
executing tuning.

Change-Id: Ife338768264ebebebc655fe11874e905abdf7482
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
parent b67a90fb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -319,6 +319,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)
{
@@ -327,6 +328,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)
{
+6 −0
Original line number Diff line number Diff line
@@ -2456,7 +2456,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;
	}
+2 −0
Original line number Diff line number Diff line
@@ -834,6 +834,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)