Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43d0af5f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: core: Ignore bus resume flags when card removal event is detected"

parents 2bfbefe1 cdf0d578
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -3407,6 +3407,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);
}

@@ -4387,6 +4394,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
@@ -4643,7 +4652,8 @@ static 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;
		}
+4 −1
Original line number Diff line number Diff line
@@ -1275,7 +1275,10 @@ static int mmc_sd_suspend(struct mmc_host *host)
	if (!err) {
		pm_runtime_disable(&host->card->dev);
		pm_runtime_set_suspended(&host->card->dev);
	}
	/* if suspend fails, force mmc_detect_change during resume */
	} else if (mmc_bus_manual_resume(host))
		host->ignore_bus_resume_flags = true;

	MMC_TRACE(host, "%s: Exit err: %d\n", __func__, err);

	return err;
+1 −0
Original line number Diff line number Diff line
@@ -543,6 +543,7 @@ struct mmc_host {
	unsigned int		bus_resume_flags;
#define MMC_BUSRESUME_MANUAL_RESUME	(1 << 0)
#define MMC_BUSRESUME_NEEDS_RESUME	(1 << 1)
	bool ignore_bus_resume_flags;

	unsigned int		sdio_irqs;
	struct task_struct	*sdio_irq_thread;