Loading drivers/mmc/core/core.c +7 −0 Original line number Original line Diff line number Diff line Loading @@ -2252,6 +2252,7 @@ int mmc_try_claim_host(struct mmc_host *host, unsigned int delay_ms) int claimed_host = 0; int claimed_host = 0; unsigned long flags; unsigned long flags; int retry_cnt = delay_ms/10; int retry_cnt = delay_ms/10; bool pm = false; do { do { spin_lock_irqsave(&host->lock, flags); spin_lock_irqsave(&host->lock, flags); Loading @@ -2260,11 +2261,17 @@ int mmc_try_claim_host(struct mmc_host *host, unsigned int delay_ms) host->claimer = current; host->claimer = current; host->claim_cnt += 1; host->claim_cnt += 1; claimed_host = 1; claimed_host = 1; if (host->claim_cnt == 1) pm = true; } } spin_unlock_irqrestore(&host->lock, flags); spin_unlock_irqrestore(&host->lock, flags); if (!claimed_host) if (!claimed_host) mmc_delay(10); mmc_delay(10); } while (!claimed_host && retry_cnt--); } while (!claimed_host && retry_cnt--); if (pm) pm_runtime_get_sync(mmc_dev(host)); if (host->ops->enable && claimed_host && host->claim_cnt == 1) if (host->ops->enable && claimed_host && host->claim_cnt == 1) host->ops->enable(host); host->ops->enable(host); return claimed_host; return claimed_host; Loading Loading
drivers/mmc/core/core.c +7 −0 Original line number Original line Diff line number Diff line Loading @@ -2252,6 +2252,7 @@ int mmc_try_claim_host(struct mmc_host *host, unsigned int delay_ms) int claimed_host = 0; int claimed_host = 0; unsigned long flags; unsigned long flags; int retry_cnt = delay_ms/10; int retry_cnt = delay_ms/10; bool pm = false; do { do { spin_lock_irqsave(&host->lock, flags); spin_lock_irqsave(&host->lock, flags); Loading @@ -2260,11 +2261,17 @@ int mmc_try_claim_host(struct mmc_host *host, unsigned int delay_ms) host->claimer = current; host->claimer = current; host->claim_cnt += 1; host->claim_cnt += 1; claimed_host = 1; claimed_host = 1; if (host->claim_cnt == 1) pm = true; } } spin_unlock_irqrestore(&host->lock, flags); spin_unlock_irqrestore(&host->lock, flags); if (!claimed_host) if (!claimed_host) mmc_delay(10); mmc_delay(10); } while (!claimed_host && retry_cnt--); } while (!claimed_host && retry_cnt--); if (pm) pm_runtime_get_sync(mmc_dev(host)); if (host->ops->enable && claimed_host && host->claim_cnt == 1) if (host->ops->enable && claimed_host && host->claim_cnt == 1) host->ops->enable(host); host->ops->enable(host); return claimed_host; return claimed_host; Loading