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-07-09 14:23:51 +0100
commit83712e007e91674b0db30e5eab44fb7222058ef1 (patch)
treea5ce2c33e53b2971183494df9ea2ee46145e765f
parentbd0a521e88aa7a06ae7aabaed7ae196ed4ad867a (diff)
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 276d21ce6bc1..e6bb68059b83 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1068,6 +1068,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;
}
}
@@ -1354,7 +1358,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;