linux/drivers/mmc/host
Luke Wang e27c946b58 mmc: sdhci-esdhc-imx: fix resume error handling
Check pm_runtime_force_resume() return value in resume. If it fails
(clock enable failure), return immediately since accessing hardware
registers on an unclocked device would cause a kernel panic.

The early return intentionally skips enable_irq() and
sdhci_disable_irq_wakeups() because the IRQ handler reads
SDHCI_INT_STATUS, which would also fault without clocks. The PM runtime
usage counter leak only affects this already-broken device instance and
is an acceptable tradeoff to preserve system stability.

Remove the return value check for mmc_gpio_set_cd_wake(host->mmc, false)
since disable_irq_wake() called internally always returns 0.

Also return 0 explicitly on the success path instead of propagating
stale return values.

Fixes: 676a838556 ("mmc: host: sdhci-esdhc-imx: refactor the system PM logic")
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-15 11:00:02 +02:00
..
alcor.c mmc: alcor: use modern PM macros 2025-08-22 12:14:03 +02:00
atmel-mci.c mmc: atmel-mci: Simplify with scoped for each OF child loop 2026-02-23 12:06:53 +01:00
au1xmmc.c mmc: au1xmmc: use modern PM macros 2025-08-22 12:14:03 +02:00
bcm2835.c mmc: Merge branch fixes into next 2025-07-03 14:17:35 +02:00
cavium-octeon.c mmc: cavium-octeon: Simplify with scoped for each OF child loop 2026-02-23 12:06:53 +01:00
cavium-thunderx.c mmc: host: Move MODULE_DEVICE_TABLE next to the table itself 2026-05-11 16:59:24 +02:00
cavium.c mmc: cavium: Use clamp to simplify cvm_mmc_set_clock 2026-02-23 12:06:53 +01:00
cavium.h
cb710-mmc.c mmc: cb710-mmc: use modern PM macros 2025-08-22 12:14:03 +02:00
cb710-mmc.h mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
cqhci-core.c mmc: cqhci: Make use of cqhci_halted() routine 2024-09-03 14:22:10 +02:00
cqhci-crypto.c blk-crypto: add basic hardware-wrapped key support 2025-02-10 09:54:19 -07:00
cqhci-crypto.h
cqhci.h mmc: sdhci-of-dwcmshc: reduce CIT for better performance 2025-11-26 11:47:05 +01:00
davinci_mmc.c mmc: davinci: fix mmc_add_host order in probe 2026-05-29 14:15:58 +02:00
dw_mmc-bluefield.c mmc: dw_mmc: Rename dw_mci_pltfm_pmops to dw_mci_pmops 2026-02-24 10:32:47 +01:00
dw_mmc-exynos.c mmc: dw_mmc: exynos: increase DMA threshold value for exynos7870 2026-05-11 16:25:01 +02:00
dw_mmc-exynos.h
dw_mmc-hi3798cv200.c mmc: dw_mmc: Let variant drivers to use struct dw_mci as possible 2026-02-23 12:06:53 +01:00
dw_mmc-hi3798mv200.c mmc: dw_mmc-hi3798mv200: Using phase map from dw_mmc core 2026-03-16 15:43:42 +01:00
dw_mmc-k3.c mmc: dw_mmc: Rename dw_mci_pltfm_pmops to dw_mci_pmops 2026-02-24 10:32:47 +01:00
dw_mmc-pci.c mmc: dw_mmc: Rename dw_mci_pltfm_pmops to dw_mci_pmops 2026-02-24 10:32:47 +01:00
dw_mmc-pltfm.c mmc: dw_mmc-pltfm: Use phase_map for SoCFPGA clock phase configuration 2026-03-23 15:51:23 +01:00
dw_mmc-pltfm.h mmc: dw_mmc: Rename dw_mci_pltfm_pmops to dw_mci_pmops 2026-02-24 10:32:47 +01:00
dw_mmc-rockchip.c mmc: dw_mmc-rockchip: Add missing private data for very old controllers 2026-05-29 14:55:24 +02:00
dw_mmc-starfive.c mmc: dw_mmc: Let variant drivers to use struct dw_mci as possible 2026-02-23 12:06:53 +01:00
dw_mmc.c mmc: dw_mmc: Add desc_num field for clarity 2026-05-29 15:12:51 +02:00
dw_mmc.h mmc: dw_mmc: Add desc_num field for clarity 2026-05-29 15:12:51 +02:00
jz4740_mmc.c mmc: jz4740: Fix Wvoid-pointer-to-enum-cast warning 2026-02-23 12:06:53 +01:00
Kconfig mmc: sdhci-pic32: allow driver to be compiled with COMPILE_TEST 2026-02-24 10:32:47 +01:00
litex_mmc.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
loongson2-mmc.c mmc: loongson2: Add Loongson-2K0300 SD/SDIO/eMMC controller driver 2026-03-09 14:19:23 +01:00
Makefile mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver 2026-02-23 12:06:55 +01:00
meson-gx-mmc.c mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
meson-mx-sdhc-clkc.c mmc: meson-mx-sdhc: use PTR_ERR_OR_ZERO() to simplify code 2025-08-19 14:34:15 +02:00
meson-mx-sdhc-mmc.c mmc: meson-mx-sdhc: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:22 +02:00
meson-mx-sdhc.h
meson-mx-sdio.c mmc: meson-mx-sdio: Ignore disabled "mmc-slot" child-nodes 2025-11-18 16:21:36 +01:00
mmc_hsq.c
mmc_hsq.h
mmc_spi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mmci_qcom_dml.c mmc: mmci: Fix device_node reference leak in of_get_dml_pipe_index() 2026-02-23 12:05:20 +01:00
mmci_stm32_sdmmc.c dma-mapping: don't return errors from dma_set_max_seg_size 2024-08-29 07:22:49 +03:00
mmci.c mmc: mmci: use modern PM macros 2025-08-22 12:14:03 +02:00
mmci.h mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
moxart-mmc.c mmc: moxart-mmc: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:23 +02:00
mtk-sd.c mmc: mtk-sd: disable new_tx/rx and modify related settings for mt8189 2026-03-26 11:38:13 +01:00
mvsdio.c mmc: mvsdio: Fix dma_unmap_sg() nents value 2025-09-12 14:04:22 +02:00
mvsdio.h
mxcmmc.c mmc: mxcmmc: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:23 +02:00
mxs-mmc.c mmc: mxs-mmc: use modern PM macros 2025-08-22 12:14:03 +02:00
of_mmc_spi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
omap_hsmmc.c mmc: use octal file permissions instead of symbolic 2025-10-21 13:37:38 +02:00
omap.c mmc: omap: add WQ_PERCPU to alloc_workqueue users 2025-11-11 18:15:01 +01:00
owl-mmc.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
pxamci.c mmc: pxamci: Simplify pxamci_probe() error handling using devm APIs 2025-11-11 17:34:28 +01:00
pxamci.h
renesas_sdhi_core.c mmc: host: renesas_sdhi_core: support selecting an optional mux 2026-03-09 13:44:45 +01:00
renesas_sdhi_internal_dmac.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
renesas_sdhi_sys_dmac.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
renesas_sdhi.h mmc: renesas_sdhi: Add suspend/resume hooks 2025-11-18 16:28:54 +01:00
rtsx_pci_sdmmc.c mmc: rtsx_pci_sdmmc: simplify voltage switch handling after card_busy() 2026-03-04 16:33:36 +01:00
rtsx_usb_sdmmc.c mmc: rtsx_usb_sdmmc: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci_am654.c mmc: sdhci_am654: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci_f_sdh30.c mmc: sdhci_f_sdh30: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:26 +02:00
sdhci_f_sdh30.h
sdhci-acpi.c mmc: sdhci-acpi: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-bcm-kona.c mmc: sdhci-bcm-kona: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:24 +02:00
sdhci-brcmstb.c mmc: sdhci-brcmstb: use correct register offset for V1 pin_sel restore 2026-02-23 12:05:20 +01:00
sdhci-cadence.c mmc: sdhci-cadence: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-cqhci.h
sdhci-dove.c mmc: sdhci-dove: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:24 +02:00
sdhci-esdhc-imx.c mmc: sdhci-esdhc-imx: fix resume error handling 2026-07-15 11:00:02 +02:00
sdhci-esdhc-mcf.c mmc: sdhci-esdhc-mcf: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:24 +02:00
sdhci-esdhc.h
sdhci-iproc.c mmc: sdhci-iproc: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:24 +02:00
sdhci-milbeaut.c mmc: sdhci-milbeaut: Drop the use of sdhci_free_host() 2025-06-24 12:43:24 +02:00
sdhci-msm.c mmc: sdhci-msm: Remove NULL check from devm_of_qcom_ice_get() 2026-05-18 09:43:25 -05:00
sdhci-npcm.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
sdhci-of-arasan.c mmc: sdhci-of-arasan: Use standard mmc_clk_phase_map infrastructure 2026-03-26 11:15:46 +01:00
sdhci-of-aspeed-test.c
sdhci-of-aspeed.c mmc: sdhci-of-aspeed: Handle optional controller reset 2026-03-25 09:55:36 +01:00
sdhci-of-at91.c mmc: sdhci-of-at91: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-of-bst.c mmc: sdhci-of-bst: Fix memory leak in sdhci_bst_alloc_bounce_buffer() 2026-03-09 14:03:24 +01:00
sdhci-of-dwcmshc.c mmc: sdhci-of-dwcmshc: check bus clock enable result in the probe() method 2026-07-06 15:22:11 +02:00
sdhci-of-esdhc.c mmc: sdhci-of-esdhc: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-of-hlwd.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-k1.c mmc: sdhci-of-k1: add comprehensive SDR tuning support 2026-05-11 17:35:47 +02:00
sdhci-of-ma35d1.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
sdhci-of-sparx5.c mmc: sdhci-of-sparx5: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:25 +02:00
sdhci-omap.c mmc: sdhci-omap: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-pci-arasan.c
sdhci-pci-core.c mmc: sdhci-pci: Drop unused include 2026-03-23 16:12:52 +01:00
sdhci-pci-dwc-mshc.c
sdhci-pci-gli.c mmc: sdhci-pci-gli: fix GL9750 DMA write corruption 2026-03-04 17:48:59 +01:00
sdhci-pci-o2micro.c mmc: sdhci-pci-o2micro: Convert PCIBIOS_* return codes to errnos 2024-06-20 10:57:44 +02:00
sdhci-pci.h mmc: sdhci-pci: Add DMI quirk for missing CD GPIO on Vexia Edu Atla 10 tablet 2024-12-02 15:06:03 +01:00
sdhci-pic32.c mmc: sdhci-pic32: add SPDX license identifier 2026-02-24 10:32:47 +01:00
sdhci-pltfm.c mmc: sdhci-pltfm: remove duplicate DTS property parsing 2026-03-16 16:14:29 +01:00
sdhci-pltfm.h mmc: sdhci: Drop sdhci_free_host()/sdhci_pltfm_free() interface 2025-06-24 12:43:26 +02:00
sdhci-pxav2.c mmc: sdhci-pxav2: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:25 +02:00
sdhci-pxav3.c mmc: sdhci-pxav3: use modern PM macros 2025-08-22 12:14:03 +02:00
sdhci-s3c.c mmc: sdhci-s3c: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-spear.c mmc: sdhci-spear: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-sprd.c mmc: sdhci-sprd: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-st.c mmc: sdhci-st: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-tegra.c mmc: sdhci-tegra: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-uhs2.c mmc: host: Remove unnecessary module_init/exit functions 2026-02-24 10:32:14 +01:00
sdhci-uhs2.h mmc: sdhci-uhs2: add irq() and others 2024-10-24 14:37:42 +02:00
sdhci-xenon-phy.c mmc: sdhci-xenon: add timeout for PHY init complete 2024-02-28 13:41:35 +01:00
sdhci-xenon.c mmc: sdhci-xenon: use modern PM macros 2025-08-22 12:14:03 +02:00
sdhci-xenon.h mmc: xenon: Add ac5 support via bounce buffer 2024-01-05 11:03:56 +01:00
sdhci.c mmc: sdhci: add signal voltage switch in sdhci_resume_host 2026-05-29 15:02:47 +02:00
sdhci.h mmc: sdhci: add some simple inline functions for !CONFIG_PM 2025-08-22 12:13:52 +02:00
sdricoh_cs.c mmc: sdricoh_cs: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:23 +02:00
sh_mmcif.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
sunplus-mmc.c mmc: rename mmc_can_gpio_cd() to mmc_host_can_gpio_cd() 2025-05-14 16:59:17 +02:00
sunxi-mmc.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
tifm_sd.c memstick: Constify the driver id_table 2026-05-11 16:59:43 +02:00
tmio_mmc_core.c mmc: tmio: Add 64-bit read/write support for SD_BUF0 in polling mode 2025-08-19 14:34:14 +02:00
tmio_mmc.h mmc: renesas_sdhi: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() 2025-11-18 16:28:54 +01:00
toshsd.c mmc: toshsd: use modern PM macros 2025-08-22 12:14:04 +02:00
toshsd.h
uniphier-sd.c mmc: tmio: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:24 +02:00
usdhi6rol0.c mmc: drop nth_page() usage within SG entry 2025-09-21 14:22:08 -07:00
ushc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
via-sdmmc.c mmc: via-sdmmc: Simplify initialisation of pci_device_id array 2026-05-11 17:24:33 +02:00
vub300.c mmc: vub300: defer reset until cmd_mutex is unlocked 2026-07-06 16:20:12 +02:00
wbsd.c mmc: wbsd: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:24 +02:00
wbsd.h mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
wmt-sdmmc.c mmc: host: Move MODULE_DEVICE_TABLE next to the table itself 2026-05-11 16:59:24 +02:00