]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mmc: core: Add support for graceful host removal for eMMC
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 7 Apr 2025 15:27:54 +0000 (17:27 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 14 May 2025 14:59:16 +0000 (16:59 +0200)
commit5b793522904e315c7bd3c4c9db96b1ab98cd9714
tree7323d87723b868cd831cab9c76d3830ca866471a
parent900ef5355861aa33d712c7e7d8fcf923e762b4cd
mmc: core: Add support for graceful host removal for eMMC

An mmc host driver may allow to unbind from its corresponding host device.
If an eMMC card is attached to the host, the mmc core will just try to cut
the power for it, without obeying to the eMMC spec.

Potentially this may damage the card and it may also prevent us from
successfully doing a re-initialization of it, which would typically happen
if/when we try to re-bind the mmc host driver.

To fix these problems, let's implement a graceful power-down of the card at
host removal.

Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250407152759.25160-5-ulf.hansson@linaro.org
drivers/mmc/core/mmc.c