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>
{
int ret;
+ mmc_claim_host(host->mmc);
+
sdhci_enable_clk(host);
sdhci_disable_card_detection(host);
if (host->vmmc) {
int ret = regulator_enable(host->vmmc);
if (ret)
- return ret;
+ goto out;
}
sdhci_enable_clk(host);
(host->tuning_mode == SDHCI_TUNING_MODE_1))
host->flags |= SDHCI_NEEDS_RETUNING;
+ mmc_release_host(host->mmc);
return ret;
}