diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2011-10-17 20:34:04 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 16:32:27 -0400 |
commit | b3bf915308ca2b50f3beec6cc824083870f0f4b5 (patch) | |
tree | 955978242b333e1388358b4b50b5f8f4a5abca04 /drivers/mmc/card | |
parent | d9ddd62943ee07a75d0428ffcf52f1a747a28c39 (diff) |
mmc: core: new discard feature support at eMMC v4.5
MMC v4.5 supports the DISCARD feature (CMD38). It's different from
trim and there's no check bit. Currently it's only supported at v4.5.
Signed-off-by: Kyungmin Park <kyungmin.park@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')
-rw-r--r-- | drivers/mmc/card/block.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index e85816e1634a..370472797fff 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -756,7 +756,9 @@ static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) | |||
756 | from = blk_rq_pos(req); | 756 | from = blk_rq_pos(req); |
757 | nr = blk_rq_sectors(req); | 757 | nr = blk_rq_sectors(req); |
758 | 758 | ||
759 | if (mmc_can_trim(card)) | 759 | if (mmc_can_discard(card)) |
760 | arg = MMC_DISCARD_ARG; | ||
761 | else if (mmc_can_trim(card)) | ||
760 | arg = MMC_TRIM_ARG; | 762 | arg = MMC_TRIM_ARG; |
761 | else | 763 | else |
762 | arg = MMC_ERASE_ARG; | 764 | arg = MMC_ERASE_ARG; |