diff options
| author | Veerabhadrarao Badiganti <vbadigan@codeaurora.org> | 2017-02-09 20:23:17 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-03 18:55:32 -0800 |
| commit | e9cc73402e87bfa62f503c7f319094f6cbdfe469 (patch) | |
| tree | 4919adfcda9a1431f1d9f9aeb2e5cb55fa022a80 /include/linux | |
| parent | 2a7bbea49bd05426d54b3392ac780a93490c6542 (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mmc/core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index a5a3bb286361..839e9ae39564 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -201,6 +201,7 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int); extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); extern void mmc_release_host(struct mmc_host *host); +extern int mmc_try_claim_host(struct mmc_host *host, unsigned int delay); extern void mmc_get_card(struct mmc_card *card); extern void mmc_put_card(struct mmc_card *card); |
