summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2013-06-09 23:10:02 +0400
committerChris Ball <cjb@laptop.org>2013-06-27 20:39:12 +0400
commit8a489aa10cf84e54de812bd964f3520504460b94 (patch)
tree288bec968688a3e66b4d0a1b53516d50378cea60 /drivers/mmc
parent331947932dfded1e458af9eee43aec918d7a5dad (diff)
downloadlinux-8a489aa10cf84e54de812bd964f3520504460b94.tar.xz
mmc: jz4740: Fix handling of read errors.
For no reason, the code handling write errors was implemented while the code handling read errors was missing. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/jz4740_mmc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index b31359da4a75..3f86592e97a2 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -231,6 +231,14 @@ static void jz4740_mmc_transfer_check_state(struct jz4740_mmc_host *host,
host->req->cmd->error = -EIO;
data->error = -EIO;
}
+ } else if (status & JZ_MMC_STATUS_READ_ERROR_MASK) {
+ if (status & (JZ_MMC_STATUS_TIMEOUT_READ)) {
+ host->req->cmd->error = -ETIMEDOUT;
+ data->error = -ETIMEDOUT;
+ } else {
+ host->req->cmd->error = -EIO;
+ data->error = -EIO;
+ }
}
}