User is possible to turn the power off after a host was removed. So, disable the power off notification when a host is removed. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> --- This topic was discussed in a few month ago [1], and now I could make a patch for unbinding the mmc host. I'm not sure this is a correct way so that I marked RFC. [1] https://patchwork.kernel.org/patch/11557505/#23408537 drivers/mmc/core/mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index ff3063c..abc4cac 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1988,6 +1988,15 @@ static int mmc_poweroff_notify(struct mmc_card *card, unsigned int notify_type) */ static void mmc_remove(struct mmc_host *host) { + /* + * Disable power_off_notification byte in the ext_csd register + */ + if (host->card->ext_csd.rev >= 6) { + mmc_claim_host(host); + mmc_poweroff_notify(host->card, EXT_CSD_NO_POWER_NOTIFICATION); + mmc_release_host(host); + } + mmc_remove_card(host->card); host->card = NULL; } -- 2.7.4