aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/at91_mci.c
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2007-07-22 16:18:46 -0400
committerPierre Ossman <drzeus@drzeus.cx>2007-09-23 02:46:48 -0400
commit17b0429dde9ab60f9cee8e07ab28c7dc6cfe6efd (patch)
tree9f87df1ffbeca4c6f828b7979f2e45ef898a3ef0 /drivers/mmc/host/at91_mci.c
parentb7e113dc9d52c4a37d2da6fafe77959f3a28eccf (diff)
mmc: remove custom error codes
Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
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}