News: 0001550036

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 6.16 Adds Support For Graceful Host Removal For eMMC & SD Cards

([Linux Storage] 108 Minutes Ago Graceful Host Removal)


The MMC subsystem feature changes have been merged for the [1]Linux 6.16 kernel. Interestingly and surprisingly, it's not until now that the Linux kernel has properly supported the graceful host removal for eMMC and SD cards.

The [2]MMC pull request for Linux 6.16 noted the following highlights:

"MMC core:

- Scan the eMMC boot areas for partition table

- Clarify purpose of mmc_can* functions by renaming them to mmc_card_can*

- Clarify helpers for host capabilities by renaming them to mmc_host_can*

- Add support for graceful host removal for SD and eMMC

- Further avoid re-storing power to the eMMC before a shutdown

- Add quirk to disable DDR50 tuning and use it for some Swissbit SD-cards

MMC host:

- mtk-sd: Add support for Dimensity 1200 MT6893

- mtk-sd: Fix condition to enable single burst type

- mtk-sd: Optimize several code-paths by aggregating register-writes

- renesas_sdhi: Add support for the Renesas RZ/V2N variant

- sdhci-msm: Add support for the SM7150 variant

- sdhci-esdhc-imx: Re-factor the system PM logic

- sdhci-esdhc-imx: Lots of improvements around the tuning support

- sdhci-of-arasan: Add support for the Renesas RZ/N1D variant

- sdhci-of-dwcmhsc: Add Sophgo SG2044 support

- sdhci-of-esdhc: Add support for the LS1021a variant

- sdhci-of-k1: Add new driver to support for SpacemiT K1 controller

- sdhci-pic32: Convert microchip,sdhci-pic32 DT doc to json schema

- wmt-sdmmc: Convert DT doc to json schema"

Besides some new hardware support, most of the changes are mostly mundane but catching my eye was the support for graceful host removal for SD and eMMC cards.

[3]

Linux developer Ulf Hansson worked on that graceful host removal and commented on the patch series:

"As pointed out by Wolfram Sang and already discussed at LKML - an mmc host driver may allow to unbind from its corresponding host device. If there is and eMMC/SD card attached to the host, the mmc core will just try to cut the power for it, without trying to make a graceful power-off, thus potentially we could damage the card.

This series intends to fix this problem for eMMC/SD cards."

Wolfram Sang raised the problem last October with a proposal to suspend MMC when unbinding. It was noted that problems could arise currently with Linux such as if the card was expecting power-off notifications but no host to send them anymore.

With Linux 6.16 this graceful host removal should now be all set for eMMC and SD cards with the MMC pull request having been merged yesterday.



[1] https://www.phoronix.com/search/Linux+6.16

[2] https://lore.kernel.org/lkml/20250527113353.209435-1-ulf.hansson@linaro.org/

[3] https://www.phoronix.com/image-viewer.php?id=2025&image=sd_lrg



muncrief

the-burrito-triangle

ahrs

AndyChow

Harrison's Postulate:
For every action, there is an equal and opposite criticism.