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

Commit fb4056da authored by Vijay Viswanath's avatar Vijay Viswanath Committed by Veerabhadrarao Badiganti
Browse files

mmc: sdhci: Add logs when ignoring timeout due to quirk



Due to some quirks, hardware timeout interrupts of commands with R1B
response get ignored. This is required as some commands take more time
to complete than what hardware controller can wait. But when actual
hardware timeout occurs due to faulty card or any other issue, the
issue will appear as software timeout and the information that a
hardware timeout occurred will be lost. So added logs through
ratelimited prink and ring buffer so that the information will be
present when debugging is required.

Change-Id: Ib8fe83c792251c55889909282d2defe466a123e7
Signed-off-by: default avatarVijay Viswanath <vviswana@codeaurora.org>
parent d8975304
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3102,8 +3102,15 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
				return;
			}
			if (host->quirks2 &
				SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD)
				SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD) {
				pr_err_ratelimited("%s: %s: ignoring interrupt: 0x%08x due to DATATOUT_FOR_R1B quirk\n",
						mmc_hostname(host->mmc),
						__func__, intmask);
				MMC_TRACE(host->mmc,
					"%s: Quirk ignoring intr: 0x%08x\n",
						__func__, intmask);
				return;
			}
			if (intmask & SDHCI_INT_DATA_TIMEOUT) {
				host->data_cmd = NULL;
				data_cmd->error = -ETIMEDOUT;