From: Matthieu CASTET Date: Thu, 14 Aug 2014 14:03:17 +0000 (+0200) Subject: sdhci : handle busy timeout irq X-Git-Tag: v3.18-rc1~98^2~104 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c5abd5e8998e20c2e82999670a03f26f1437d744;p=karo-tx-linux.git sdhci : handle busy timeout irq When we wait for busy after sending a command, if there is a timeout, we got SDHCI_INT_DATA_TIMEOUT flags. Before this commit we got the message : "Got data interrupt 0x00100000 even though no data operation was in progress." and we need to wait 10s that sdhci_timeout_timer expires. Signed-off-by: Matthieu CASTET Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index d25deff305a5..bcad1084cc74 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2304,6 +2304,11 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) * above in sdhci_cmd_irq(). */ if (host->cmd && (host->cmd->flags & MMC_RSP_BUSY)) { + if (intmask & SDHCI_INT_DATA_TIMEOUT) { + host->cmd->error = -ETIMEDOUT; + tasklet_schedule(&host->finish_tasklet); + return; + } if (intmask & SDHCI_INT_DATA_END) { sdhci_finish_command(host); return;