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>
mmc_release_host(host);
}
+ if (!err)
+ mmc_claim_host(host);
+
return err;
}
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,