|
@@ -135,12 +135,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
|
|
mq->queue->limits.max_discard_sectors = UINT_MAX;
|
|
mq->queue->limits.max_discard_sectors = UINT_MAX;
|
|
if (card->erased_byte == 0)
|
|
if (card->erased_byte == 0)
|
|
mq->queue->limits.discard_zeroes_data = 1;
|
|
mq->queue->limits.discard_zeroes_data = 1;
|
|
- if (!mmc_can_trim(card) && is_power_of_2(card->erase_size)) {
|
|
|
|
- mq->queue->limits.discard_granularity =
|
|
|
|
- card->erase_size << 9;
|
|
|
|
- mq->queue->limits.discard_alignment =
|
|
|
|
- card->erase_size << 9;
|
|
|
|
- }
|
|
|
|
|
|
+ mq->queue->limits.discard_granularity = card->pref_erase << 9;
|
|
if (mmc_can_secure_erase_trim(card))
|
|
if (mmc_can_secure_erase_trim(card))
|
|
queue_flag_set_unlocked(QUEUE_FLAG_SECDISCARD,
|
|
queue_flag_set_unlocked(QUEUE_FLAG_SECDISCARD,
|
|
mq->queue);
|
|
mq->queue);
|