diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2021-12-03 15:15:54 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-12-20 11:09:15 +0100 |
commit | 66c915d09b942fb3b2b0cb2f56562180901fba17 (patch) | |
tree | cc524c76e200a44c4a0a040a1b196d7723ab0523 /drivers/mmc/core/core.h | |
parent | 4fc7261dbab139d3c64c3b618262504e16cfe7ee (diff) | |
download | linux-66c915d09b942fb3b2b0cb2f56562180901fba17.tar.bz2 |
mmc: core: Disable card detect during shutdown
It's seems prone to problems by allowing card detect and its corresponding
mmc_rescan() work to run, during platform shutdown. For example, we may end
up turning off the power while initializing a card, which potentially could
damage it.
To avoid this scenario, let's add ->shutdown_pre() callback for the mmc host
class device and then turn of the card detect from there.
Reported-by: Al Cooper <alcooperx@gmail.com>
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211203141555.105351-1-ulf.hansson@linaro.org
Diffstat (limited to 'drivers/mmc/core/core.h')
-rw-r--r-- | drivers/mmc/core/core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index 7931a4f0137d..f5f3f623ea49 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -70,6 +70,7 @@ static inline void mmc_delay(unsigned int ms) void mmc_rescan(struct work_struct *work); void mmc_start_host(struct mmc_host *host); +void __mmc_stop_host(struct mmc_host *host); void mmc_stop_host(struct mmc_host *host); void _mmc_detect_change(struct mmc_host *host, unsigned long delay, |