diff options
author | Seungwon Jeon <tgih.jun@samsung.com> | 2011-10-14 07:03:21 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 22:32:28 +0200 |
commit | 881d1c25f765938a95def5afe39486ce39f9fc96 (patch) | |
tree | 694d5ea1b3fba2c28cc110123f2ca50b4408f309 /drivers/mmc/card/block.c | |
parent | mmc: core: Modify the timeout value for writing power class (diff) | |
download | linux-881d1c25f765938a95def5afe39486ce39f9fc96.tar.xz linux-881d1c25f765938a95def5afe39486ce39f9fc96.zip |
mmc: core: Add cache control for eMMC4.5 device
This patch adds cache feature of eMMC4.5 Spec.
If device supports cache capability, host can utilize some specific
operations.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r-- | drivers/mmc/card/block.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 370472797fff..c0cb225bbb47 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -851,16 +851,18 @@ out: static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) { struct mmc_blk_data *md = mq->data; + struct mmc_card *card = md->queue.card; + int ret = 0; + + ret = mmc_flush_cache(card); + if (ret) + ret = -EIO; - /* - * No-op, only service this because we need REQ_FUA for reliable - * writes. - */ spin_lock_irq(&md->lock); - __blk_end_request_all(req, 0); + __blk_end_request_all(req, ret); spin_unlock_irq(&md->lock); - return 1; + return ret ? 0 : 1; } /* |