diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-09 19:10:52 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-09 19:10:52 +0200 |
commit | f318052ef2f07da2cd0c535d0d2900d5080a47e1 (patch) | |
tree | 774dc124e551f8cf96d423de8c54d691beba8a42 | |
parent | Merge tag 'drm-fixes-2020-10-09' of git://anongit.freedesktop.org/drm/drm (diff) | |
parent | mmc: core: don't set limits.discard_granularity as 0 (diff) | |
download | linux-f318052ef2f07da2cd0c535d0d2900d5080a47e1.tar.xz linux-f318052ef2f07da2cd0c535d0d2900d5080a47e1.zip |
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
-rw-r--r-- | drivers/mmc/core/queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index 6c022ef0f84d..350d0cc4ee62 100644 --- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -190,7 +190,7 @@ static void mmc_queue_setup_discard(struct request_queue *q, q->limits.discard_granularity = card->pref_erase << 9; /* granularity must not be greater than max. discard */ if (card->pref_erase > max_discard) - q->limits.discard_granularity = 0; + q->limits.discard_granularity = SECTOR_SIZE; if (mmc_can_secure_erase_trim(card)) blk_queue_flag_set(QUEUE_FLAG_SECERASE, q); } |