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

Commit 773bf34c authored by Veerabhadrarao Badiganti's avatar Veerabhadrarao Badiganti
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 9f28bf89
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -325,6 +325,7 @@ void mmc_retune_enable(struct mmc_host *host)
		mod_timer(&host->retune_timer,
			  jiffies + host->retune_period * HZ);
}
EXPORT_SYMBOL(mmc_retune_enable);

/*
 * Pause re-tuning for a small set of operations.  The pause begins after the
@@ -357,6 +358,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
@@ -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);
		return err;
	}

+2 −0
Original line number Diff line number Diff line
@@ -855,6 +855,8 @@ static inline bool mmc_card_hs400es(struct mmc_card *card)
	return card->host->ios.enhanced_strobe;
}

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)