1 From 81d112d6c0e16fd0136ce2c5f511ba81ed1f23d2 Mon Sep 17 00:00:00 2001
2 From: Paul Cercueil <paul@crapouillou.net>
3 Date: Sun, 3 Jun 2012 13:07:19 +0200
4 Subject: [PATCH 05/16] MMC: JZ4740: Fix handling of read errors.
6 For no reason, the code handling write errors was implemented while
7 the code handling read errors was missing.
9 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
11 drivers/mmc/host/jz4740_mmc.c | 8 ++++++++
12 1 file changed, 8 insertions(+)
14 --- a/drivers/mmc/host/jz4740_mmc.c
15 +++ b/drivers/mmc/host/jz4740_mmc.c
16 @@ -231,6 +231,14 @@ static void jz4740_mmc_transfer_check_st
17 host->req->cmd->error = -EIO;
20 + } else if (status & JZ_MMC_STATUS_READ_ERROR_MASK) {
21 + if (status & (JZ_MMC_STATUS_TIMEOUT_READ)) {
22 + host->req->cmd->error = -ETIMEDOUT;
23 + data->error = -ETIMEDOUT;
25 + host->req->cmd->error = -EIO;