diff options
| author | Luke Wang <ziniu.wang_1@nxp.com> | 2026-02-04 11:40:03 +0800 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2026-02-23 12:06:55 +0100 |
| commit | d6bf2e64dec87322f2b11565ddb59c0e967f96e3 (patch) | |
| tree | bb217f47501b129c9f4a5de5feedc4937ca8623f /include | |
| parent | f3b9683bf5432aaada84bb4a7f815f3eb3148a90 (diff) | |
| download | linux-d6bf2e64dec87322f2b11565ddb59c0e967f96e3.tar.gz linux-d6bf2e64dec87322f2b11565ddb59c0e967f96e3.zip | |
mmc: core: Optimize time for secure erase/trim for some Kingston eMMCs
Kingston eMMC IY2964 and IB2932 takes a fixed ~2 seconds for each secure
erase/trim operation regardless of size - that is, a single secure
erase/trim operation of 1MB takes the same time as 1GB. With default
calculated 3.5MB max discard size, secure erase 1GB requires ~300 separate
operations taking ~10 minutes total.
Add a card quirk, MMC_QUIRK_FIXED_SECURE_ERASE_TRIM_TIME, to set maximum
secure erase size for those devices. This allows 1GB secure erase to
complete in a single operation, reducing time from 10 minutes to just 2
seconds.
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mmc/card.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 4722dd7e46ce..9dc4750296af 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -330,6 +330,7 @@ struct mmc_card { #define MMC_QUIRK_BROKEN_SD_POWEROFF_NOTIFY (1<<17) /* Disable broken SD poweroff notify support */ #define MMC_QUIRK_NO_UHS_DDR50_TUNING (1<<18) /* Disable DDR50 tuning */ #define MMC_QUIRK_BROKEN_MDT (1<<19) /* Wrong manufacturing year */ +#define MMC_QUIRK_FIXED_SECURE_ERASE_TRIM_TIME (1<<20) /* Secure erase/trim time is fixed regardless of size */ bool written_flag; /* Indicates eMMC has been written since power on */ bool reenable_cmdq; /* Re-enable Command Queue */ |
