diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-09-02 22:08:53 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-09-09 07:59:25 -0400 |
commit | 2e47e84245adcb1b3872210678b6146f674fb3ff (patch) | |
tree | 0ab356fa3d0d079a855ed65e5b51326328738e99 /drivers/mmc/card | |
parent | adc828556dfc3f87a5c1338fc5412cbec3c0b529 (diff) |
mmc: Add .multi_io_quirk callback for multi I/O HW bug
Historically, we have been using MMC_CAP* to handle host HW issues and
currently the block layer uses MMC_CAP2_NO_MULTI_READ flag for a multi
I/O HW bug workaround.
There are a few tweaks needed to make MMC_CAP2_NO_MULTI_READ suite all
situations. Therefore let's add an optional host ops callback to enable
host drivers to return the number of blocks it allows per request.
In a future patch and when host drivers have converted to the new
callback, MMC_CAP2_NO_MULTI_READ shall be removed.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index ede41f05c392..adab9038f6f7 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -1402,6 +1402,16 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, | |||
1402 | if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ && | 1402 | if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ && |
1403 | rq_data_dir(req) == READ) | 1403 | rq_data_dir(req) == READ) |
1404 | brq->data.blocks = 1; | 1404 | brq->data.blocks = 1; |
1405 | |||
1406 | /* | ||
1407 | * Some controllers have HW issues while operating | ||
1408 | * in multiple I/O mode | ||
1409 | */ | ||
1410 | if (card->host->ops->multi_io_quirk) | ||
1411 | brq->data.blocks = card->host->ops->multi_io_quirk(card, | ||
1412 | (rq_data_dir(req) == READ) ? | ||
1413 | MMC_DATA_READ : MMC_DATA_WRITE, | ||
1414 | brq->data.blocks); | ||
1405 | } | 1415 | } |
1406 | 1416 | ||
1407 | if (brq->data.blocks > 1 || do_rel_wr) { | 1417 | if (brq->data.blocks > 1 || do_rel_wr) { |