mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] mmc: speed up secure erase on ISSI IS22TF128G eMMC
@ 2026-11-11 12:07 Michael Haener
  2026-11-11 12:07 ` [PATCH 1/2] mmc: add ISSI IS22TF128G to fixed secure erase time quirk Michael Haener
  2026-11-11 12:07 ` [PATCH 2/2] mmc: core: saturate erase timeout instead of overflowing Michael Haener
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Haener @ 2026-11-11 12:07 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-mmc, linux-kernel, Avri Altman, Luke Wang, Michael Haener

Secure erasing a 33.5GiB partition on an ISSI IS22TF128G eMMC (NXP
i.MX8, sdhci-esdhc-imx) takes 5-7 hours, because the request is split
into roughly 10000 max_discard sized secure erase commands, each with a
large fixed overhead.

Patch 1 adds the card to MMC_QUIRK_FIXED_SECURE_ERASE_TRIM_TIME, which
brings the same operation down to about 6 minutes. It is tagged for
stable.

Patch 2 is hardening for the quirk: with qty no longer bound by
max_busy_timeout, the 32-bit erase timeout calculation can overflow for
cards with large ERASE_TIMEOUT_MULT * SEC_ERASE_MULT. None of the
currently quirked cards reach that limit (the ISSI card is at about
half of it), so it is not tagged for stable.

Michael Haener (2):
  mmc: add ISSI IS22TF128G to fixed secure erase time quirk
  mmc: core: saturate erase timeout instead of overflowing

 drivers/mmc/core/card.h   |  1 +
 drivers/mmc/core/core.c   | 19 ++++++++++++++-----
 drivers/mmc/core/quirks.h |  9 +++++++++
 3 files changed, 24 insertions(+), 5 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-11 12:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 12:07 [PATCH 0/2] mmc: speed up secure erase on ISSI IS22TF128G eMMC Michael Haener
2026-11-11 12:07 ` [PATCH 1/2] mmc: add ISSI IS22TF128G to fixed secure erase time quirk Michael Haener
2026-11-11 12:07 ` [PATCH 2/2] mmc: core: saturate erase timeout instead of overflowing Michael Haener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®