diff options
Diffstat (limited to 'drivers/mmc/card/queue.c')
-rw-r--r-- | drivers/mmc/card/queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 2517547b4366..996f8e36e23d 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -139,7 +139,7 @@ static void mmc_queue_setup_discard(struct request_queue *q, | |||
139 | 139 | ||
140 | queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); | 140 | queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); |
141 | q->limits.max_discard_sectors = max_discard; | 141 | q->limits.max_discard_sectors = max_discard; |
142 | if (card->erased_byte == 0) | 142 | if (card->erased_byte == 0 && !mmc_can_discard(card)) |
143 | q->limits.discard_zeroes_data = 1; | 143 | q->limits.discard_zeroes_data = 1; |
144 | q->limits.discard_granularity = card->pref_erase << 9; | 144 | q->limits.discard_granularity = card->pref_erase << 9; |
145 | /* granularity must not be greater than max. discard */ | 145 | /* granularity must not be greater than max. discard */ |