diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-22 16:18:46 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 02:46:48 -0400 |
commit | 17b0429dde9ab60f9cee8e07ab28c7dc6cfe6efd (patch) | |
tree | 9f87df1ffbeca4c6f828b7979f2e45ef898a3ef0 /drivers/mmc/host/tifm_sd.c | |
parent | b7e113dc9d52c4a37d2da6fafe77959f3a28eccf (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/tifm_sd.c')
-rw-r--r-- | drivers/mmc/host/tifm_sd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index 8b736e96844..b4a56e5e513 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c | |||
@@ -404,14 +404,14 @@ static void tifm_sd_check_status(struct tifm_sd *host) | |||
404 | struct tifm_dev *sock = host->dev; | 404 | struct tifm_dev *sock = host->dev; |
405 | struct mmc_command *cmd = host->req->cmd; | 405 | struct mmc_command *cmd = host->req->cmd; |
406 | 406 | ||
407 | if (cmd->error != MMC_ERR_NONE) | 407 | if (cmd->error) |
408 | goto finish_request; | 408 | goto finish_request; |
409 | 409 | ||
410 | if (!(host->cmd_flags & CMD_READY)) | 410 | if (!(host->cmd_flags & CMD_READY)) |
411 | return; | 411 | return; |
412 | 412 | ||
413 | if (cmd->data) { | 413 | if (cmd->data) { |
414 | if (cmd->data->error != MMC_ERR_NONE) { | 414 | if (cmd->data->error) { |
415 | if ((host->cmd_flags & SCMD_ACTIVE) | 415 | if ((host->cmd_flags & SCMD_ACTIVE) |
416 | && !(host->cmd_flags & SCMD_READY)) | 416 | && !(host->cmd_flags & SCMD_READY)) |
417 | return; | 417 | return; |
@@ -504,7 +504,7 @@ static void tifm_sd_card_event(struct tifm_dev *sock) | |||
504 | { | 504 | { |
505 | struct tifm_sd *host; | 505 | struct tifm_sd *host; |
506 | unsigned int host_status = 0; | 506 | unsigned int host_status = 0; |
507 | int cmd_error = MMC_ERR_NONE; | 507 | int cmd_error = 0; |
508 | struct mmc_command *cmd = NULL; | 508 | struct mmc_command *cmd = NULL; |
509 | unsigned long flags; | 509 | unsigned long flags; |
510 | 510 | ||
@@ -521,15 +521,15 @@ static void tifm_sd_card_event(struct tifm_dev *sock) | |||
521 | writel(host_status & TIFM_MMCSD_ERRMASK, | 521 | writel(host_status & TIFM_MMCSD_ERRMASK, |
522 | sock->addr + SOCK_MMCSD_STATUS); | 522 | sock->addr + SOCK_MMCSD_STATUS); |
523 | if (host_status & TIFM_MMCSD_CTO) | 523 | if (host_status & TIFM_MMCSD_CTO) |
524 | cmd_error = MMC_ERR_TIMEOUT; | 524 | cmd_error = -ETIMEDOUT; |
525 | else if (host_status & TIFM_MMCSD_CCRC) | 525 | else if (host_status & TIFM_MMCSD_CCRC) |
526 | cmd_error = MMC_ERR_BADCRC; | 526 | cmd_error = -EILSEQ; |
527 | 527 | ||
528 | if (cmd->data) { | 528 | if (cmd->data) { |
529 | if (host_status & TIFM_MMCSD_DTO) | 529 | if (host_status & TIFM_MMCSD_DTO) |
530 | cmd->data->error = MMC_ERR_TIMEOUT; | 530 | cmd->data->error = -ETIMEDOUT; |
531 | else if (host_status & TIFM_MMCSD_DCRC) | 531 | else if (host_status & TIFM_MMCSD_DCRC) |
532 | cmd->data->error = MMC_ERR_BADCRC; | 532 | cmd->data->error = -EILSEQ; |
533 | } | 533 | } |
534 | 534 | ||
535 | writel(TIFM_FIFO_INT_SETALL, | 535 | writel(TIFM_FIFO_INT_SETALL, |
@@ -722,7 +722,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
722 | return; | 722 | return; |
723 | 723 | ||
724 | err_out: | 724 | err_out: |
725 | mrq->cmd->error = MMC_ERR_TIMEOUT; | 725 | mrq->cmd->error = -ETIMEDOUT; |
726 | mmc_request_done(mmc, mrq); | 726 | mmc_request_done(mmc, mrq); |
727 | } | 727 | } |
728 | 728 | ||
@@ -1012,9 +1012,9 @@ static void tifm_sd_remove(struct tifm_dev *sock) | |||
1012 | writel(TIFM_FIFO_INT_SETALL, | 1012 | writel(TIFM_FIFO_INT_SETALL, |
1013 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); | 1013 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); |
1014 | writel(0, sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); | 1014 | writel(0, sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); |
1015 | host->req->cmd->error = MMC_ERR_TIMEOUT; | 1015 | host->req->cmd->error = -ENOMEDIUM; |
1016 | if (host->req->stop) | 1016 | if (host->req->stop) |
1017 | host->req->stop->error = MMC_ERR_TIMEOUT; | 1017 | host->req->stop->error = -ENOMEDIUM; |
1018 | tasklet_schedule(&host->finish_tasklet); | 1018 | tasklet_schedule(&host->finish_tasklet); |
1019 | } | 1019 | } |
1020 | spin_unlock_irqrestore(&sock->lock, flags); | 1020 | spin_unlock_irqrestore(&sock->lock, flags); |