sdhci : handle busy timeout irq
authorMatthieu CASTET <matthieu.castet@parrot.com>
Thu, 14 Aug 2014 14:03:17 +0000 (16:03 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 9 Sep 2014 11:59:02 +0000 (13:59 +0200)
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 <matthieu.castet@parrot.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c

index d25deff305a5e2a506762196e9a53b467b0bb73a..bcad1084cc747e2a3b683cba8e2ebc5e1d3244c5 100644 (file)
@@ -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;
This page took 0.027908 seconds and 5 git commands to generate.