aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2018-06-19 23:12:57 +0300
committerMichael Bestas <mkbestas@lineageos.org>2018-06-19 23:12:57 +0300
commitde6dac6df6807f901bac8e29de24a6a7981aea2d (patch)
treea70d6303c33a857e730b5d920bfe7dc1047999dc /drivers/mmc/core/core.c
parented9b46f6268d2abcbb9079bf44261e3b6e8c424f (diff)
parent44ff472b917252c55c8e96ce7e0612aed13269cb (diff)
Merge tag 'LA.UM.6.6.r1-08900-89xx.0' of kernel/msm-3.18 into lineage-15.1-caf-8996
Conflicts: net/sctp/socket.c Change-Id: I90c45f914ac4d11bbeee3722ede5ea55e52898e1
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index b4ad723b4e36..7cceec44d2d8 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -3002,6 +3002,13 @@ static void _mmc_detect_change(struct mmc_host *host, unsigned long delay,
pm_wakeup_event(mmc_dev(host), 5000);
host->detect_change = 1;
+ /*
+ * Change in cd_gpio state, so make sure detection part is
+ * not overided because of manual resume.
+ */
+ if (cd_irq && mmc_bus_manual_resume(host))
+ host->ignore_bus_resume_flags = true;
+
mmc_schedule_delayed_work(&host->detect, delay);
}
@@ -3923,6 +3930,8 @@ void mmc_rescan(struct work_struct *work)
host->bus_ops->detect(host);
host->detect_change = 0;
+ if (host->ignore_bus_resume_flags)
+ host->ignore_bus_resume_flags = false;
/*
* Let mmc_bus_put() free the bus/bus_ops if we've found that
@@ -4184,7 +4193,8 @@ int mmc_pm_notify(struct notifier_block *notify_block,
spin_lock_irqsave(&host->lock, flags);
host->rescan_disable = 0;
- if (mmc_bus_manual_resume(host)) {
+ if (mmc_bus_manual_resume(host) &&
+ !host->ignore_bus_resume_flags) {
spin_unlock_irqrestore(&host->lock, flags);
break;
}