提交 640e09bc 编写于 作者: M Micky Ching 提交者: Chris Ball

mmc: rtsx: fix card poweroff bug

If the host driver removed while card in the slot, the host will not
power off card power correctly. This bug is produced because host
eject flag set before the last mmc_set_ios callback, we should set the
eject flag after power off.
Signed-off-by: NMicky Ching <micky_ching@realsil.com.cn>
Signed-off-by: NChris Ball <chris@printf.net>
上级 9107ebbf
......@@ -1297,7 +1297,6 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev)
pcr->slots[RTSX_SD_CARD].p_dev = NULL;
pcr->slots[RTSX_SD_CARD].card_event = NULL;
mmc = host->mmc;
host->eject = true;
mutex_lock(&host->host_mutex);
if (host->mrq) {
......@@ -1315,6 +1314,8 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev)
mutex_unlock(&host->host_mutex);
mmc_remove_host(mmc);
host->eject = true;
mmc_free_host(mmc);
dev_dbg(&(pdev->dev),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册