]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: core: sd: Apply BROKEN_SD_DISCARD quirk earlier
authorAvri Altman <avri.altman@sandisk.com>
Mon, 26 May 2025 11:44:45 +0000 (14:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 14:03:04 +0000 (16:03 +0200)
commit3c0c18ef4c7907d1b36119a5c273b7ee01619652
tree33758b35964867101d89edb2ceb00d7892cbdea1
parentc4fad2460c1721b93c446512fc8828e8222011c9
mmc: core: sd: Apply BROKEN_SD_DISCARD quirk earlier

commit 009c3a4bc41e855fd76f92727f9fbae4e5917d7f upstream.

Move the BROKEN_SD_DISCARD quirk for certain SanDisk SD cards from the
`mmc_blk_fixups[]` to `mmc_sd_fixups[]`. This ensures the quirk is
applied earlier in the device initialization process, aligning with the
reasoning in [1]. Applying the quirk sooner prevents the kernel from
incorrectly enabling discard support on affected cards during initial
setup.

[1] https://lore.kernel.org/all/20240820230631.GA436523@sony.com

Fixes: 07d2872bf4c8 ("mmc: core: Add SD card quirk for broken discard")
Signed-off-by: Avri Altman <avri.altman@sandisk.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250526114445.675548-1-avri.altman@sandisk.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/core/quirks.h