mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-10-02 00:00:41 +02:00
Following is the sequence during system resume (dpm_resume()): 1. SDCC driver resume gets called which does nothing as it will find the device as runtime suspended. 2. As part of dpm_resume() itself, mmc_bus_resume() is called which results in this call flow: mmc_bus_resume -> mmc_blk_resume -> mmc_blk_set_blksize -> mmc_claim_host -> mmc_host_enable -> host_ops->enable -> SDCC driver runtime resume. We really don't want to do runtime resume of SDCC as part of dpm_resume() othewise it will increase the latency of overall system resume path. For sector addressed cards (card size > 2GB), default blocksize is 512 bytes which means setting block length by sending CMD16 (SET_BLOCKLEN) is not required for such cards. But mmc_blk_set_blksize() first claims host and then check if card requires CMD16 or not. mmc_claim_host() will cause runtime resume of SDCC device. So it's better to first check if card requires CMD16 or not for setting block length to 512 and then claim the host only if it's required. CRs-fixed: 344459 Change-Id: I428cedeeee08cdc82ef9805f4d72179dfe0b3ce8 Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>