mmc: core: Retry claim host in mmc_sd_detect
Use mmc_try_claim_host with a timeout instead of mmc_claim_host in mmc_sd_detect. This is to ensure that mmc rescan work item is doesn't get blocked on claim_host for longer period. In the pm_suspend path, we cancel the mmc_rescan work item. If this work item is already scheduled, suspend would be blocked till mmc_rescan gets finished. In case, mmc_rescan is blocked on claim_host lock, pm_suspend could get blocked for longer period. This can result in momentary UI freeze since pm_suspend is blocked for longer duration. This change is to prevent this scenario. Change-Id: Ib93bae6745a153bad3579ae42f46c3c3a7c1b95a Signed-off-by:Veerabhadrarao Badiganti <vbadigan@codeaurora.org> Signed-off-by:
Sarthak Garg <sartgarg@codeaurora.org>
Loading
Please register or sign in to comment