aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/queue.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2010-08-11 17:17:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 11:43:30 -0400
commit4980454868af4b2f84f1f15f4b76512eecb37e1d (patch)
treec8480c25797558d44f39fdbec2e8a4b22f47c729 /drivers/mmc/card/queue.c
parent8d57a98ccd0b4489003473979da8f5a1363ba7a3 (diff)
mmc_block: add support for secure discard
Secure discard is implemented by Secure Trim if the discard is unaligned or Secure Erase otherwise. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: Jens Axboe <axboe@kernel.dk> Cc: Kyungmin Park <kmpark@infradead.org> Cc: Madhusudhan Chikkature <madhu.cr@ti.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Ben Gardiner <bengardiner@nanometrics.ca> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc/card/queue.c')
-rw-r--r--drivers/mmc/card/queue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 3b15884e435..e876678176b 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -141,6 +141,9 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
141 mq->queue->limits.discard_alignment = 141 mq->queue->limits.discard_alignment =
142 card->erase_size << 9; 142 card->erase_size << 9;
143 } 143 }
144 if (mmc_can_secure_erase_trim(card))
145 queue_flag_set_unlocked(QUEUE_FLAG_SECDISCARD,
146 mq->queue);
144 } 147 }
145 148
146#ifdef CONFIG_MMC_BLOCK_BOUNCE 149#ifdef CONFIG_MMC_BLOCK_BOUNCE