diff options
-rw-r--r-- | drivers/mmc/card/block.c | 10 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 7 |
2 files changed, 17 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) { |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 4cbf61476999..10e2bd6985ae 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -139,6 +139,13 @@ struct mmc_host_ops { | |||
139 | int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv); | 139 | int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv); |
140 | void (*hw_reset)(struct mmc_host *host); | 140 | void (*hw_reset)(struct mmc_host *host); |
141 | void (*card_event)(struct mmc_host *host); | 141 | void (*card_event)(struct mmc_host *host); |
142 | |||
143 | /* | ||
144 | * Optional callback to support controllers with HW issues for multiple | ||
145 | * I/O. Returns the number of supported blocks for the request. | ||
146 | */ | ||
147 | int (*multi_io_quirk)(struct mmc_card *card, | ||
148 | unsigned int direction, int blk_size); | ||
142 | }; | 149 | }; |
143 | 150 | ||
144 | struct mmc_card; | 151 | struct mmc_card; |