[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7069893705ade20c1fe60340ad42a53ee0cb05c7.1392626512.git.micky_ching@realsil.com.cn>
Date: Mon, 17 Feb 2014 16:45:46 +0800
From: <micky_ching@...lsil.com.cn>
To: <chris@...ntf.net>, <sameo@...ux.intel.com>, <lee.jones@...aro.org>
CC: <gregkh@...uxfoundation.org>, <dan.carpenter@...cle.com>,
<ulf.hansson@...aro.org>, <devel@...uxdriverproject.org>,
<linux-kernel@...r.kernel.org>, <linux-mmc@...r.kernel.org>,
<rogerable@...ltek.com>, <wei_wang@...lsil.com.cn>,
Micky Ching <micky_ching@...lsil.com.cn>
Subject: [PATCH v2 1/3] mmc: rtsx: fix card poweroff bug
From: Micky Ching <micky_ching@...lsil.com.cn>
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: Micky Ching <micky_ching@...lsil.com.cn>
---
drivers/mmc/host/rtsx_pci_sdmmc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index c46feda..cc80e31 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -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),
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists