Re: [PATCH 0/2] mmc: speed up secure erase on ISSI IS22TF128G eMMC

From: Ulf Hansson

Date: Mon Nov 30 2026 - 11:15:35 EST


On Wed, Nov 11, 2026 at 1:09 PM Michael Haener
<michael.haener@xxxxxxxxxxx> wrote:
>
> 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.

Even if we don't have a card at this point that needs patch2, I think
it's better to tag them both for stable.

Otherwise we would need to keep track of this, when there is another
quirk added for another card in the future.

>
> 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
>

The above said, both patches applied for fixes and by adding a stable
for patch2, thanks!

Kind regards
Uffe