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

Commit 8533fecc 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 command response CRC error handling"

parents 58fe20f6 847c3475
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -2847,6 +2847,23 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask, u32 *mask)
		    (command != MMC_SEND_TUNING_BLOCK) &&
		    (command != MMC_SEND_STATUS))
				host->flags |= SDHCI_NEEDS_RETUNING;

		/*
		 * If this command initiates a data phase and a response
		 * CRC error is signalled, the card can start transferring
		 * data - the card may have received the command without
		 * error.  We must not terminate the mmc_request early.
		 *
		 * If the card did not receive the command or returned an
		 * error which prevented it sending data, the data phase
		 * will time out.
		 */
		if (host->cmd->data &&
		    (intmask & (SDHCI_INT_CRC | SDHCI_INT_TIMEOUT)) ==
		     SDHCI_INT_CRC) {
			host->cmd = NULL;
			return;
		}
		tasklet_schedule(&host->finish_tasklet);
		return;
	}