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

Commit 8630a48b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci: Fix issue with SDHCI_NEEDS_RETUNING"

parents 2adf163a ac9fd305
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1735,6 +1735,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
					MMC_SEND_TUNING_BLOCK_HS200 :
					MMC_SEND_TUNING_BLOCK;
				host->mrq = NULL;
				host->flags &= ~SDHCI_NEEDS_RETUNING;
				spin_unlock_irqrestore(&host->lock, flags);
				sdhci_execute_tuning(mmc, tuning_opcode);
				spin_lock_irqsave(&host->lock, flags);
@@ -2774,6 +2775,7 @@ static void sdhci_tuning_timer(unsigned long data)
static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
{
	u16 auto_cmd_status;
	u32 command;
	BUG_ON(intmask == 0);

	if (!host->cmd) {
@@ -2805,7 +2807,12 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
	}

	if (host->cmd->error) {
		if (host->cmd->error == -EILSEQ)
		command = SDHCI_GET_CMD(sdhci_readw(host,
						    SDHCI_COMMAND));
		if (host->cmd->error == -EILSEQ &&
		    (command != MMC_SEND_TUNING_BLOCK_HS400) &&
		    (command != MMC_SEND_TUNING_BLOCK_HS200) &&
		    (command != MMC_SEND_TUNING_BLOCK))
				host->flags |= SDHCI_NEEDS_RETUNING;
		tasklet_schedule(&host->finish_tasklet);
		return;