diff options
author | Seungwon Jeon <tgih.jun@samsung.com> | 2011-10-14 01:03:21 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 16:32:28 -0400 |
commit | 881d1c25f765938a95def5afe39486ce39f9fc96 (patch) | |
tree | 694d5ea1b3fba2c28cc110123f2ca50b4408f309 /drivers/mmc/card/block.c | |
parent | 71fe3eb0d006861bdae57e93975b6ae3d9b55e99 (diff) |
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: | |||
851 | static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) | 851 | static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) |
852 | { | 852 | { |
853 | struct mmc_blk_data *md = mq->data; | 853 | struct mmc_blk_data *md = mq->data; |
854 | struct mmc_card *card = md->queue.card; | ||
855 | int ret = 0; | ||
856 | |||
857 | ret = mmc_flush_cache(card); | ||
858 | if (ret) | ||
859 | ret = -EIO; | ||
854 | 860 | ||
855 | /* | ||
856 | * No-op, only service this because we need REQ_FUA for reliable | ||
857 | * writes. | ||
858 | */ | ||
859 | spin_lock_irq(&md->lock); | 861 | spin_lock_irq(&md->lock); |
860 | __blk_end_request_all(req, 0); | 862 | __blk_end_request_all(req, ret); |
861 | spin_unlock_irq(&md->lock); | 863 | spin_unlock_irq(&md->lock); |
862 | 864 | ||
863 | return 1; | 865 | return ret ? 0 : 1; |
864 | } | 866 | } |
865 | 867 | ||
866 | /* | 868 | /* |