diff options
-rw-r--r-- | drivers/mmc/host/sdhci.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 4a24db028d87..56de4c48ec80 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -922,20 +922,17 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) | |||
922 | return; | 922 | return; |
923 | } | 923 | } |
924 | 924 | ||
925 | if (intmask & SDHCI_INT_RESPONSE) | 925 | if (intmask & SDHCI_INT_TIMEOUT) |
926 | sdhci_finish_command(host); | 926 | host->cmd->error = MMC_ERR_TIMEOUT; |
927 | else { | 927 | else if (intmask & SDHCI_INT_CRC) |
928 | if (intmask & SDHCI_INT_TIMEOUT) | 928 | host->cmd->error = MMC_ERR_BADCRC; |
929 | host->cmd->error = MMC_ERR_TIMEOUT; | 929 | else if (intmask & (SDHCI_INT_END_BIT | SDHCI_INT_INDEX)) |
930 | else if (intmask & SDHCI_INT_CRC) | 930 | host->cmd->error = MMC_ERR_FAILED; |
931 | host->cmd->error = MMC_ERR_BADCRC; | 931 | |
932 | else if (intmask & (SDHCI_INT_END_BIT | SDHCI_INT_INDEX)) | 932 | if (host->cmd->error != MMC_ERR_NONE) |
933 | host->cmd->error = MMC_ERR_FAILED; | ||
934 | else | ||
935 | host->cmd->error = MMC_ERR_INVALID; | ||
936 | |||
937 | tasklet_schedule(&host->finish_tasklet); | 933 | tasklet_schedule(&host->finish_tasklet); |
938 | } | 934 | else if (intmask & SDHCI_INT_RESPONSE) |
935 | sdhci_finish_command(host); | ||
939 | } | 936 | } |
940 | 937 | ||
941 | static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) | 938 | static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) |