diff options
author | Ryan QIAN <b32804@freescale.com> | 2012-10-09 08:58:41 +0800 |
---|---|---|
committer | Robby Cai <R63905@freescale.com> | 2012-10-09 17:19:35 +0800 |
commit | a45192ced4ef5e2eda3827e9dcb712414ec3bfde (patch) | |
tree | 1552acaf50ec0040bc30b27db9f289d33034b5ca /drivers | |
parent | e722029d7c06af8d63a3991c8f2f0741da8dd7ef (diff) |
ENGR00220469 mmc: sdio: claim host on suspend and release on resuming
issue:
Since there's no sync mechanism between sdio bus suspending and sdio_irq_thread,
it will cause that sdio_irq_thread still makes sdhc request even after sdio bus
suspends.
fix:
On suspending sdio bus, claim host, so that:
1. mmc_sdio_suspend will wait for finishing of sdio_irq_thread.
2. sdio_irq_thread will be blocked even being scheduled.
And release host on resuming.
Acked-by: Aisheng DONG <b29396@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/sdio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 16b7484917c7..cc3736bedb2b 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -638,6 +638,9 @@ static int mmc_sdio_suspend(struct mmc_host *host) mmc_release_host(host); } + if (!err) + mmc_claim_host(host); + return err; } @@ -648,9 +651,6 @@ static int mmc_sdio_resume(struct mmc_host *host) BUG_ON(!host); BUG_ON(!host->card); - /* Basic card reinitialization. */ - mmc_claim_host(host); - /* No need to reinitialize powered-resumed nonremovable cards */ if (mmc_card_is_removable(host) && !mmc_card_keep_power(host)) err = mmc_sdio_init_card(host, host->ocr, host->card, |