summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <jon.medhurst@linaro.org>2011-12-20 15:03:38 +0000
committerJon Medhurst <tixy@linaro.org>2012-03-19 09:06:29 +0000
commit6af36d89e14e31a1e75c9c020a26a309b3031924 (patch)
treee16627bd25ef049bdebd51db650fd71c40233fb1
parentc16fa4f2ad19908a47c63d8fa436a1178438c7e7 (diff)
downloadlinux-linaro-tracking-tracking-armlt-mmc.tar.gz
mmc: block: Make multi-block write errors retry as single block writestracking-armlt-mmc-3.3-2012.03-2tracking-armlt-mmc
The current mmc block code retries i/o errors on multi-block reads by using single block reads. For platforms with unreliable multi-block operations, like the ARM Versatile Express board, this is a valuable error recovery path. This patch extends the single block retry to also include write operations. Signed-off-by: Jon Medhurst <jon.medhurst@linaro.org>
-rw-r--r--drivers/mmc/card/block.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c6a383d0244d..db9a549e6830 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1058,6 +1058,10 @@ static int mmc_blk_err_check(struct mmc_card *card,
return MMC_BLK_ECC_ERR;
return MMC_BLK_DATA_ERR;
} else {
+ if (brq->data.blocks > 1) {
+ /* Hack to redo transfer one sector at a time */
+ return MMC_BLK_DATA_ERR;
+ }
return MMC_BLK_CMD_ERR;
}
}
@@ -1323,7 +1327,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
case MMC_BLK_ECC_ERR:
if (brq->data.blocks > 1) {
/* Redo read one sector at a time */
- pr_warning("%s: retrying using single block read\n",
+ pr_warning("%s: retrying using single block transfer\n",
req->rq_disk->disk_name);
disable_multi = 1;
break;