summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRitesh Harjani <riteshh@codeaurora.org>2016-05-19 14:04:34 +0530
committerKyle Yan <kyan@codeaurora.org>2016-06-15 16:11:43 -0700
commit9e6175fca80248e837a2c4aca31494faf3602404 (patch)
tree6033d6e50e956e0f7e136d0f5e944513ac907e70 /drivers/mmc
parent88e55dd551059174d052151918859ff7d9b26012 (diff)
mmc: sdhci: Fix command response INDEX/END bit error handling
In addition to patch 71fcbda0fcddd0 (mmc: sdhci: fix command response CRC error handling), cmd INDEX and END bit error also needs to handle the same way as in mentioned patch. So adding cmd index and end bit error case to it. Change-Id: I6671bb51259515acb0733ce65be8084716d3bfbf Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4ff966ca33c2..6bfd95823da7 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2830,10 +2830,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask, u32 *mask)
* If the card did not receive the command or returned an
* error which prevented it sending data, the data phase
* will time out.
+ *
+ * Even in case of cmd INDEX OR ENDBIT error we
+ * handle it the same way.
*/
if (host->cmd->data &&
- (intmask & (SDHCI_INT_CRC | SDHCI_INT_TIMEOUT)) ==
- SDHCI_INT_CRC) {
+ (((intmask & (SDHCI_INT_CRC | SDHCI_INT_TIMEOUT)) ==
+ SDHCI_INT_CRC) || (host->cmd->error == -EILSEQ))) {
host->cmd = NULL;
return;
}