public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] mmc: core: Add support for graceful host removal for eMMC/SD
@ 2025-04-07 15:27 Ulf Hansson
  2025-04-07 15:27 ` [PATCH v2 1/5] mmc: core: Convert mmc_can_poweroff_notify() into a bool Ulf Hansson
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Ulf Hansson @ 2025-04-07 15:27 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson
  Cc: Adrian Hunter, Wolfram Sang, Yoshihiro Shimoda, Avri Altman,
	linux-renesas-soc, linux-kernel

Changes in v2:
	- Added reviewed/tested-by tags.
	- Updated patch 2.

As pointed out by Wolfram Sang and already discussed at LKML [1] - 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.

Please help to test and review!

Kind regards
Ulf Hansson

[1]
https://lore.kernel.org/all/20241007093447.33084-2-wsa+renesas@sang-engineering.com/

Ulf Hansson (5):
  mmc: core: Convert mmc_can_poweroff_notify() into a bool
  mmc: core: Further avoid re-storing power to the eMMC before a
    shutdown
  mmc: core: Convert into an enum for the poweroff-type for eMMC
  mmc: core: Add support for graceful host removal for eMMC
  mmc: core: Add support for graceful host removal for SD

 drivers/mmc/core/mmc.c | 71 +++++++++++++++++++++++++++++-------------
 drivers/mmc/core/sd.c  | 25 +++++++++------
 2 files changed, 64 insertions(+), 32 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-04-09 14:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 15:27 [PATCH v2 0/5] mmc: core: Add support for graceful host removal for eMMC/SD Ulf Hansson
2025-04-07 15:27 ` [PATCH v2 1/5] mmc: core: Convert mmc_can_poweroff_notify() into a bool Ulf Hansson
2025-04-07 15:27 ` [PATCH v2 2/5] mmc: core: Further avoid re-storing power to the eMMC before a shutdown Ulf Hansson
2025-04-08  8:09   ` Wolfram Sang
2025-04-08 12:40     ` Ulf Hansson
2025-04-08 15:07       ` Wolfram Sang
2025-04-09 13:13         ` Ulf Hansson
2025-04-09 14:46           ` Wolfram Sang
2025-04-07 15:27 ` [PATCH v2 3/5] mmc: core: Convert into an enum for the poweroff-type for eMMC Ulf Hansson
2025-04-07 15:27 ` [PATCH v2 4/5] mmc: core: Add support for graceful host removal " Ulf Hansson
2025-04-07 15:27 ` [PATCH v2 5/5] mmc: core: Add support for graceful host removal for SD Ulf Hansson

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