[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a261a89b6c087404127900c6b0b6ee95442a37c3.1576540908.git.nguyenb@codeaurora.org>
Date: Mon, 16 Dec 2019 18:50:41 -0800
From: "Bao D. Nguyen" <nguyenb@...eaurora.org>
To: ulf.hansson@...aro.org, robh+dt@...nel.org
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
asutoshd@...eaurora.org, cang@...eaurora.org,
Subhash Jadavani <subhashj@...eaurora.org>,
"Bao D. Nguyen" <nguyenb@...eaurora.org>
Subject: [<PATCH v1> 8/9] mmc: core: remove shutdown handler
From: Subhash Jadavani <subhashj@...eaurora.org>
If mmc/sd shutdown callback suspends the card when card's runtime PM status
is still set to "runtime active" then any request issued after mmc/sd
shutdown will not resume the card hence we will end up issuing the request
to host driver while card isn't in a state to handle it.
Right way to fix this issue is not to allow any requests to flow in after
the shutdown callback has executed. Until it is fixed in the right way, we
are disabling the shutdown handling as it anyways doesn't do real useful
things.
Signed-off-by: Subhash Jadavani <subhashj@...eaurora.org>
Signed-off-by: Bao D. Nguyen <nguyenb@...eaurora.org>
---
drivers/mmc/core/mmc.c | 22 ----------------------
drivers/mmc/core/sd.c | 1 -
2 files changed, 23 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index f6912de..a5110f7 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -2080,27 +2080,6 @@ static int _mmc_resume(struct mmc_host *host)
}
/*
- * Shutdown callback
- */
-static int mmc_shutdown(struct mmc_host *host)
-{
- int err = 0;
-
- /*
- * In a specific case for poweroff notify, we need to resume the card
- * before we can shutdown it properly.
- */
- if (mmc_can_poweroff_notify(host->card) &&
- !(host->caps2 & MMC_CAP2_FULL_PWR_CYCLE))
- err = _mmc_resume(host);
-
- if (!err)
- err = _mmc_suspend(host, false);
-
- return err;
-}
-
-/*
* Callback for resume.
*/
static int mmc_resume(struct mmc_host *host)
@@ -2185,7 +2164,6 @@ static int _mmc_hw_reset(struct mmc_host *host)
.runtime_suspend = mmc_runtime_suspend,
.runtime_resume = mmc_runtime_resume,
.alive = mmc_alive,
- .shutdown = mmc_shutdown,
.hw_reset = _mmc_hw_reset,
};
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index fe914ff..5938caf 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1259,7 +1259,6 @@ static int mmc_sd_hw_reset(struct mmc_host *host)
.suspend = mmc_sd_suspend,
.resume = mmc_sd_resume,
.alive = mmc_sd_alive,
- .shutdown = mmc_sd_suspend,
.hw_reset = mmc_sd_hw_reset,
};
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists