aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/at91_mci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/at91_mci.c')
-rw-r--r--drivers/mmc/host/at91_mci.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 955ea60583b5..810a433ce532 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -577,24 +577,22 @@ static void at91_mci_completed_command(struct at91mci_host *host)
577 AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE | 577 AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE |
578 AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)) { 578 AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)) {
579 if ((status & AT91_MCI_RCRCE) && !(mmc_resp_type(cmd) & MMC_RSP_CRC)) { 579 if ((status & AT91_MCI_RCRCE) && !(mmc_resp_type(cmd) & MMC_RSP_CRC)) {
580 cmd->error = MMC_ERR_NONE; 580 cmd->error = 0;
581 } 581 }
582 else { 582 else {
583 if (status & (AT91_MCI_RTOE | AT91_MCI_DTOE)) 583 if (status & (AT91_MCI_RTOE | AT91_MCI_DTOE))
584 cmd->error = MMC_ERR_TIMEOUT; 584 cmd->error = -ETIMEDOUT;
585 else if (status & (AT91_MCI_RCRCE | AT91_MCI_DCRCE)) 585 else if (status & (AT91_MCI_RCRCE | AT91_MCI_DCRCE))
586 cmd->error = MMC_ERR_BADCRC; 586 cmd->error = -EILSEQ;
587 else if (status & (AT91_MCI_OVRE | AT91_MCI_UNRE))
588 cmd->error = MMC_ERR_FIFO;
589 else 587 else
590 cmd->error = MMC_ERR_FAILED; 588 cmd->error = -EIO;
591 589
592 pr_debug("Error detected and set to %d (cmd = %d, retries = %d)\n", 590 pr_debug("Error detected and set to %d (cmd = %d, retries = %d)\n",
593 cmd->error, cmd->opcode, cmd->retries); 591 cmd->error, cmd->opcode, cmd->retries);
594 } 592 }
595 } 593 }
596 else 594 else
597 cmd->error = MMC_ERR_NONE; 595 cmd->error = 0;
598 596
599 at91_mci_process_next(host); 597 at91_mci_process_next(host);
600} 598}