diff options
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index c0cb225bbb47..a1cb21f95302 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -1030,13 +1030,20 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, | |||
1030 | if (brq->data.blocks > card->host->max_blk_count) | 1030 | if (brq->data.blocks > card->host->max_blk_count) |
1031 | brq->data.blocks = card->host->max_blk_count; | 1031 | brq->data.blocks = card->host->max_blk_count; |
1032 | 1032 | ||
1033 | /* | 1033 | if (brq->data.blocks > 1) { |
1034 | * After a read error, we redo the request one sector at a time | 1034 | /* |
1035 | * in order to accurately determine which sectors can be read | 1035 | * After a read error, we redo the request one sector |
1036 | * successfully. | 1036 | * at a time in order to accurately determine which |
1037 | */ | 1037 | * sectors can be read successfully. |
1038 | if (disable_multi && brq->data.blocks > 1) | 1038 | */ |
1039 | brq->data.blocks = 1; | 1039 | if (disable_multi) |
1040 | brq->data.blocks = 1; | ||
1041 | |||
1042 | /* Some controllers can't do multiblock reads due to hw bugs */ | ||
1043 | if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ && | ||
1044 | rq_data_dir(req) == READ) | ||
1045 | brq->data.blocks = 1; | ||
1046 | } | ||
1040 | 1047 | ||
1041 | if (brq->data.blocks > 1 || do_rel_wr) { | 1048 | if (brq->data.blocks > 1 || do_rel_wr) { |
1042 | /* SPI multiblock writes terminate using a special | 1049 | /* SPI multiblock writes terminate using a special |