This fixes the following eMMC suspend/resume issue as seen on
Colibri T30 1GB IT V1.1A:
[ 75.479664] mmcblk0: error -110 transferring data, sector 287240, nr 2,
cmd response 0x900, card status 0xc00
[ 75.580923] end_request: I/O error, dev mmcblk0, sector 287240
[ 75.586782] Buffer I/O error on device mmcblk0p2, logical block 123140
[ 75.593313] lost page write due to I/O error on mmcblk0p2
(fixes an issue probably caused by a merge conflict introduced by
commit
7f7b042a978edfc6c7d1e14ec9c6ec01ffcc284b)
Signed-off-by: Mirza Krak <mirza.krak@hostmobility.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
}
if (mmc->card) {
+ /*
+ * If eMMC cards are put in sleep state, Vccq can be disabled
+ * but Vcc would still be powered on. In resume, we only restore
+ * the controller context. So, set MMC_PM_KEEP_POWER flag.
+ */
+ if (mmc_card_can_sleep(mmc) &&
+ !(mmc->caps & MMC_CAP2_NO_SLEEP_CMD))
+ mmc->pm_flags = MMC_PM_KEEP_POWER;
+
ret = mmc_suspend_host(host->mmc);
if (ret)
goto err_suspend_host;