diff options
author | Tony Lin <tony.lin@freescale.com> | 2011-12-27 13:47:09 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-01-09 21:12:48 +0800 |
commit | a2547482745e4f543f7ebafdb8c9eab1ef5c7b50 (patch) | |
tree | 9f2c486e04f4217c14bba9b7d3aebb3e33476624 /drivers | |
parent | 0ac65a0cbb15018b66df7ee3db6d6c9b52f338b6 (diff) |
ENGR00170944 [MX6Q MMC]suspend/resume crash
if the system suspend in the process of data transfer, current request
is broken by the suspend request, thus there're sd/mmc requests error logs.
to prevent this error, add a claim host in suspend function and release it
in resume function to make sure the request is finished before entering suspend
and next request could be started after resuming.
Signed-off-by: Tony Lin <tony.lin@freescale.com>
Diffstat (limited to 'drivers')
-rwxr-xr-x | drivers/mmc/host/sdhci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 9e78f0a5064b..7b8ad2706d22 100755 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2287,6 +2287,8 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state) { int ret; + mmc_claim_host(host->mmc); + sdhci_enable_clk(host); sdhci_disable_card_detection(host); @@ -2325,7 +2327,7 @@ int sdhci_resume_host(struct sdhci_host *host) if (host->vmmc) { int ret = regulator_enable(host->vmmc); if (ret) - return ret; + goto out; } sdhci_enable_clk(host); @@ -2357,6 +2359,7 @@ out: (host->tuning_mode == SDHCI_TUNING_MODE_1)) host->flags |= SDHCI_NEEDS_RETUNING; + mmc_release_host(host->mmc); return ret; } |