Skip to content

Commit f318052

Browse files
committed
Merge tag 'mmc-v5.9-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fix from Ulf Hansson: "Assign a proper discard granularity rather than incorrectly set it to zero" * tag 'mmc-v5.9-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: don't set limits.discard_granularity as 0
2 parents fd330b1 + 4243219 commit f318052

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/core/queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
190190
q->limits.discard_granularity = card->pref_erase << 9;
191191
/* granularity must not be greater than max. discard */
192192
if (card->pref_erase > max_discard)
193-
q->limits.discard_granularity = 0;
193+
q->limits.discard_granularity = SECTOR_SIZE;
194194
if (mmc_can_secure_erase_trim(card))
195195
blk_queue_flag_set(QUEUE_FLAG_SECERASE, q);
196196
}

0 commit comments

Comments
 (0)