linux-stable/drivers/mmc/core
Ulf Hansson 87a0d90fcd mmc: core: Further prevent card detect during shutdown
Disabling card detect from the host's ->shutdown_pre() callback turned out
to not be the complete solution. More precisely, beyond the point when the
mmc_bus->shutdown() has been called, to gracefully power off the card, we
need to prevent card detect. Otherwise the mmc_rescan work may poll for the
card with a CMD13, to see if it's still alive, which then will fail and
hang as the card has already been powered off.

To fix this problem, let's disable mmc_rescan prior to power off the card
during shutdown.

Reported-by: Anthony Pighin <anthony.pighin@nokia.com>
Fixes: 66c915d09b ("mmc: core: Disable card detect during shutdown")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Closes: https://lore.kernel.org/all/BN0PR08MB695133000AF116F04C3A9FFE83212@BN0PR08MB6951.namprd08.prod.outlook.com/
Tested-by: Anthony Pighin <anthony.pighin@nokia.com>
Message-ID: <20241125122446.18684-1-ulf.hansson@linaro.org>
2024-12-02 15:37:16 +01:00
..
block.c MMC core: 2024-11-20 12:51:32 -08:00
block.h mmc: block: Remove code no longer needed after the switch to blk-mq 2017-12-11 13:02:22 +01:00
bus.c mmc: core: Further prevent card detect during shutdown 2024-12-02 15:37:16 +01:00
bus.h mmc: core: constify the struct device_type usage 2024-02-27 13:48:36 +01:00
card.h mmc: sd: SDUC Support Recognition 2024-10-14 12:29:01 +02:00
core.c mmc: core: Further prevent card detect during shutdown 2024-12-02 15:37:16 +01:00
core.h mmc: core: Prepare to support SD UHS-II cards 2024-10-14 12:40:10 +02:00
crypto.c blk-crypto: rename blk_keyslot_manager to blk_crypto_profile 2021-10-21 10:49:32 -06:00
crypto.h mmc: core: Add basic support for inline encryption 2021-02-01 12:02:33 +01:00
debugfs.c mmc: debugfs: add card entry for quirks 2024-04-02 12:25:08 +02:00
host.c mmc: core: Remove unused of_gpio.h 2024-04-02 12:21:38 +02:00
host.h mmc: host: factor out clearing the retune state 2021-08-24 10:15:28 +02:00
Kconfig mmc: block: add RPMB dependency 2024-09-03 14:34:44 +02:00
Makefile mmc: core: Prepare to support SD UHS-II cards 2024-10-14 12:40:10 +02:00
mmc_ops.c mmc: core: Factor out some of the code in mmc_go_idle() 2024-10-14 12:40:10 +02:00
mmc_ops.h mmc: core: Factor out some of the code in mmc_go_idle() 2024-10-14 12:40:10 +02:00
mmc_test.c mmc: core: Disable SDUC for mmc_test 2024-10-14 12:40:09 +02:00
mmc.c mmc: core Convert UNSTUFF_BITS macro to inline function 2024-09-03 14:34:24 +02:00
pwrseq_emmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
pwrseq_sd8787.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
pwrseq_simple.c mmc: pwrseq_simple: Handle !RESET_CONTROLLER properly 2024-11-12 19:38:47 +01:00
pwrseq.c mmc: pwrseq: Use device_match_of_node() 2022-12-07 13:22:37 +01:00
pwrseq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
queue.c mmc: core: Only set maximum DMA segment size if DMA is supported 2024-10-03 01:23:57 +02:00
queue.h block: move cache control settings out of queue->flags 2024-06-19 07:58:28 -06:00
quirks.h mmc: core: Add SD card quirk for broken poweroff notification 2024-10-14 12:29:00 +02:00
regulator.c mmc: core: Extend support for mmc regulators with a vqmmc2 2024-10-14 12:40:10 +02:00
sd_ops.c mmc: core: Support UHS-II card control and access 2024-10-24 14:22:24 +02:00
sd_ops.h mmc: core: Support UHS-II card control and access 2024-10-24 14:22:24 +02:00
sd_uhs2.c mmc: core: Correction a warning caused by incorrect type in assignment for UHS-II 2024-11-12 17:49:00 +01:00
sd.c mmc: core: Support UHS-II card control and access 2024-10-24 14:22:24 +02:00
sd.h mmc: core: Support UHS-II card control and access 2024-10-24 14:22:24 +02:00
sdio_bus.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
sdio_bus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio_cis.c mmc: sdio: fix possible resource leaks in some error paths 2023-02-14 00:06:22 +01:00
sdio_cis.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio_io.c mmc: sdio: Spelling s/compement/complement/ 2023-01-23 15:51:38 +01:00
sdio_irq.c mmc: core: Switch to basic workqueue API for sdio_irq_work 2022-09-14 11:53:47 +02:00
sdio_ops.c mmc: sdio: Use mmc_pre_req() / mmc_post_req() 2020-09-07 08:57:44 +02:00
sdio_ops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio_uart.c mmc: add missing MODULE_DESCRIPTION() macros 2024-06-20 14:40:55 +02:00
sdio.c mmc: sd: SDUC Support Recognition 2024-10-14 12:29:01 +02:00
slot-gpio.c mmc: slot-gpio: Use irq_handler_t type 2024-04-26 06:47:04 +02:00
slot-gpio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00