linux/drivers/mmc/host
Ulf Hansson af34cc8c5e mmc: rtsx_usb_sdmmc: Fix error-path in sd_set_power_mode()
[ Upstream commit 47a255f7d2 ]

In the error path of sd_set_power_mode() we don't update host->power_mode,
which could lead to an imbalance of the runtime PM usage count. Fix this by
always updating host->power_mode.

Reviewed-by: Avri Altman <avri.altman@sandisk.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Ricky Wu <ricky_wu@realtek.com>
Link: https://lore.kernel.org/r/20250610111633.504366-2-ulf.hansson@linaro.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-08-20 18:30:25 +02:00
..
alcor.c mmc: alcor: Convert to platform remove callback returning void 2023-08-15 12:45:06 +02:00
atmel-mci.c mmc: atmel-mci: Add missing clk_disable_unprepare() 2025-03-28 22:03:30 +01:00
au1xmmc.c mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
bcm2835.c mmc: bcm2835: Fix dma_unmap_sg() nents value 2025-07-24 08:56:26 +02:00
cavium-octeon.c mmc: cavium-octeon: Convert to platform remove callback returning void 2023-08-15 12:45:05 +02:00
cavium-thunderx.c mmc: Explicitly include correct DT includes 2023-08-09 13:21:48 +02:00
cavium.c mmc: cavium: Use '"%s...", __func__' to print function name 2021-03-30 11:42:06 +02:00
cavium.h mmc: cavium: Add scatter-gather DMA support 2017-04-24 21:42:10 +02:00
cb710-mmc.c mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +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: rename blk_keyslot_manager to blk_crypto_profile 2021-10-21 10:49:32 -06:00
cqhci-crypto.h mmc: core: Store pointer to bio_crypt_ctx in mmc_request 2021-08-24 10:15:32 +02:00
cqhci.h mmc: cqhci: Add cqhci set_tran_desc() callback 2024-04-02 12:21:39 +02:00
davinci_mmc.c mmc: davinci_mmc: report all possible bus widths 2024-07-11 17:59:22 +02:00
dw_mmc-bluefield.c mmc: dw_mmc-bluefield: Add support for eMMC HW reset 2024-07-08 15:02:46 +02:00
dw_mmc-exynos.c mmc: dw_mmc: add exynos7870 DW MMC support 2025-05-29 11:02:21 +02:00
dw_mmc-exynos.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
dw_mmc-hi3798cv200.c mmc: dw_mmc-hi3798cv200: Remove unneeded assignment 2024-04-02 12:21:39 +02:00
dw_mmc-hi3798mv200.c mmc: dw_mmc-hi3798mv200: Remove unneeded assignment 2024-04-02 12:21:39 +02:00
dw_mmc-k3.c mmc: dw_mmc: Make dw_mci_pltfm_remove() return void 2023-06-12 15:16:18 +02:00
dw_mmc-pci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
dw_mmc-pltfm.c mmc: dw_mmc: Make dw_mci_pltfm_remove() return void 2023-06-12 15:16:18 +02:00
dw_mmc-pltfm.h mmc: dw_mmc: Make dw_mci_pltfm_remove() return void 2023-06-12 15:16:18 +02:00
dw_mmc-rockchip.c mmc: dw_mmc-rockchip: Add support for rk3576 SoCs 2024-09-03 14:11:44 +02:00
dw_mmc-starfive.c mmc: starfive: Change tuning implementation 2023-09-27 12:13:18 +02:00
dw_mmc.c mmc: dw_mmc: add a quirk for accessing 64-bit FIFOs in two halves 2025-04-20 10:15:15 +02:00
dw_mmc.h mmc: dw_mmc: add a quirk for accessing 64-bit FIFOs in two halves 2025-04-20 10:15:15 +02:00
jz4740_mmc.c mmc: jz4740: Use device_get_match_data() 2023-10-10 15:54:57 +02:00
Kconfig mmc: sdhci-of-ma35d1: Add Nuvoton MA35D1 SDHCI driver 2024-08-26 13:01:49 +02:00
litex_mmc.c mmc: litex_mmc: Convert to platform remove callback returning void 2023-08-15 12:45:03 +02:00
Makefile mmc: sdhci-of-ma35d1: Add Nuvoton MA35D1 SDHCI driver 2024-08-26 13:01:49 +02:00
meson-gx-mmc.c mmc: meson-gx: Remove setting of CMD_CFG_ERROR 2023-10-27 11:59:14 +02:00
meson-mx-sdhc-clkc.c mmc: meson-mx-sdhc: Use devm_clk_hw_get_clk() for clock retrieval 2024-02-27 13:39:12 +01:00
meson-mx-sdhc-mmc.c mmc: meson-mx-sdhc: Remove .card_hw_reset callback 2024-02-27 13:39:12 +01:00
meson-mx-sdhc.h mmc: host: meson-mx-sdhc: new driver for the Amlogic Meson SDHC host 2020-05-28 11:22:14 +02:00
meson-mx-sdio.c mmc: meson-mx-sdio: Convert to platform remove callback returning void 2023-08-15 12:45:05 +02:00
mmc_hsq.c mmc: hsq: Improve random I/O write performance for 4k buffers 2023-09-27 12:13:18 +02:00
mmc_hsq.h mmc: hsq: Improve random I/O write performance for 4k buffers 2023-09-27 12:13:18 +02:00
mmc_spi.c mmc: mmc_spi: drop buggy snprintf() 2024-12-05 14:01:26 +01:00
mmci.c mmc: mmci: stm32: add SDIO in-band interrupt mode 2023-12-07 14:08:44 +01:00
mmci.h mmc: mmci: stm32: add SDIO in-band interrupt mode 2023-12-07 14:08:44 +01:00
mmci_qcom_dml.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02: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
moxart-mmc.c Revert "mmc: moxart-mmc: Use sg_miter for PIO" 2024-06-20 10:57:44 +02:00
mtk-sd.c mtk-sd: reset host->mrq on prepare_data() error 2025-07-10 16:04:44 +02:00
mvsdio.c MMC core: 2024-10-11 11:23:21 -07:00
mvsdio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mxcmmc.c mmc: mxcmmc: Use sg_miter for PIO 2024-02-13 13:40:56 +01:00
mxs-mmc.c mmc: mxs-mmc: Convert to platform remove callback returning void 2023-08-15 12:45:05 +02:00
of_mmc_spi.c mmc: add missing MODULE_DESCRIPTION() macros 2024-06-20 14:40:55 +02:00
omap.c mmc: omap: Fix memory leak in mmc_omap_new_slot 2025-04-10 14:39:38 +02:00
omap_hsmmc.c mmc: omap_hsmmc: Convert to platform remove callback returning void 2023-08-15 12:45:04 +02:00
owl-mmc.c mmc: owl: Convert to platform remove callback returning void 2023-08-15 12:45:06 +02:00
pxamci.c mmc: pxamci: Convert to platform remove callback returning void 2023-08-15 12:45:05 +02:00
pxamci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
renesas_sdhi.h mmc: sdhi: Convert from tasklet to BH workqueue 2024-07-08 11:35:18 +02:00
renesas_sdhi_core.c mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe 2025-05-09 09:50:32 +02:00
renesas_sdhi_internal_dmac.c mmc: renesas_sdhi: Add RZ/V2H(P) compatible string 2024-08-26 13:01:49 +02:00
renesas_sdhi_sys_dmac.c - New Drivers 2024-07-17 17:42:20 -07:00
rtsx_pci_sdmmc.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rtsx_usb_sdmmc.c mmc: rtsx_usb_sdmmc: Fix error-path in sd_set_power_mode() 2025-08-20 18:30:25 +02:00
sdhci-acpi.c mmc: sdhci-acpi: Add quirk to enable pull-up on the card-detect GPIO on Asus T100TA 2024-04-26 06:46:58 +02:00
sdhci-bcm-kona.c mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
sdhci-brcmstb.c mmc: sdhci-brcmstb: add cqhci suspend/resume to PM ops 2025-03-28 22:03:30 +01:00
sdhci-cadence.c mmc: sdhci-cadence: Use sdhci_pltfm_remove() 2023-08-15 13:35:20 +02:00
sdhci-cqhci.h mmc: cqhci: Provide helper for resetting both SDHCI and CQHCI 2022-11-07 13:28:47 +01:00
sdhci-dove.c mmc: sdhci-dove: Use sdhci_pltfm_remove() 2023-08-15 13:35:24 +02:00
sdhci-esdhc-imx.c mmc: sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G 2025-02-17 10:04:50 +01:00
sdhci-esdhc-mcf.c mmc: sdhci-esdhc-mcf: Constify struct sdhci_ops 2024-04-26 06:47:04 +02:00
sdhci-esdhc.h mmc: sdhci-of-esdhc: make sure delay chain locked for HS400 2020-10-28 11:07:01 +01:00
sdhci-iproc.c mmc: sdhci-iproc: Use sdhci_pltfm_remove() 2023-08-15 13:35:32 +02:00
sdhci-milbeaut.c mmc: sdhci: milbeaut: Convert to platform remove callback returning void 2023-08-15 12:45:04 +02:00
sdhci-msm.c mmc: sdhci-msm: Ensure SD card power isn't ON when card removed 2025-08-20 18:30:25 +02:00
sdhci-npcm.c mmc: sdhci-npcm: Add NPCM SDHCI driver 2023-10-10 15:54:26 +02:00
sdhci-of-arasan.c mmc: sdhci-of-arasan: Use sdhci_pltfm_remove() 2023-08-15 13:35:35 +02:00
sdhci-of-aspeed-test.c mmc: sdhci-of-aspeed: test: Use kunit_test_suite() macro 2022-07-11 17:13:32 -06:00
sdhci-of-aspeed.c mmc: sdhci-of-aspeed: fix module autoloading 2024-08-28 16:56:19 +02:00
sdhci-of-at91.c mmc: sdhci-of-at91: Use sdhci_pltfm_remove() 2023-08-15 13:35:39 +02:00
sdhci-of-dwcmshc.c mmc: sdhci-of-dwcmshc: add PD workaround on RK3576 2025-06-19 15:32:23 +02:00
sdhci-of-esdhc.c mmc: sdhci-of-esdhc: Use sdhci_pltfm_remove() 2023-08-15 13:35:42 +02:00
sdhci-of-hlwd.c mmc: sdhci-pltfm: Rename sdhci_pltfm_register() 2023-08-15 13:36:02 +02:00
sdhci-of-ma35d1.c mmc: sdhci-of-ma35d1: Add Nuvoton MA35D1 SDHCI driver 2024-08-26 13:01:49 +02:00
sdhci-of-sparx5.c mmc: sdhci-of-sparx5: Use sdhci_pltfm_remove() 2023-08-15 13:35:48 +02:00
sdhci-omap.c mmc: sdhci-omap: Disable MMC_CAP_AGGRESSIVE_PM for eMMC/SD 2025-04-10 14:39:38 +02:00
sdhci-pci-arasan.c mmc:host:sdhci-pci:Addition of Arasan PCI Controller with integrated phy. 2018-01-04 12:46:11 +01:00
sdhci-pci-core.c mmc: sdhci-pci: Quirk for broken command queuing on Intel GLK-based Positivo models 2025-07-24 08:56:26 +02:00
sdhci-pci-dwc-mshc.c mmc: sdhci-pci-dwc-mshc: synopsys dwc mshc support 2018-07-16 11:21:45 +02:00
sdhci-pci-gli.c mmc: sdhci-pci-gli: GL9767: Fix low power mode in the SD Express process 2024-10-28 12:30:27 +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-14 20:03:31 +01:00
sdhci-pic32.c mmc: sdhci-pic32: Convert to platform remove callback returning void 2023-08-15 12:45:04 +02:00
sdhci-pltfm.c mmc: sdhci-pltfm: Make driver OF independent 2023-10-10 15:46:39 +02:00
sdhci-pltfm.h mmc: sdhci-pltfm: Rename sdhci_pltfm_register() 2023-08-15 13:36:02 +02:00
sdhci-pxav2.c mmc: sdhci-pxav2: Remove unnecessary null pointer check 2024-08-26 13:01:49 +02:00
sdhci-pxav3.c mmc: sdhci-pxav3: set NEED_RSP_BUSY capability 2025-04-10 14:39:38 +02:00
sdhci-s3c.c mmc: sdhci-s3c: Choose sdhci_ops based on variant 2024-04-26 06:47:04 +02:00
sdhci-spear.c mmc: sdhci-spear: Convert to platform remove callback returning void 2023-08-15 12:48:20 +02:00
sdhci-sprd.c mmc: sdhci-sprd: Constify struct sdhci_ops 2024-04-26 06:47:04 +02:00
sdhci-st.c mmc: sdhci-st: Use sdhci_pltfm_remove() 2023-08-15 13:35:56 +02:00
sdhci-tegra.c mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk 2024-12-27 14:02:06 +01: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: xenon: Add ac5 support via bounce buffer 2024-01-05 11:03:56 +01:00
sdhci-xenon.h mmc: xenon: Add ac5 support via bounce buffer 2024-01-05 11:03:56 +01:00
sdhci.c Revert "mmc: sdhci: Disable SD card clock before changing parameters" 2025-07-10 16:04:42 +02:00
sdhci.h mmc: sdhci: Add a helper function for dump register in dynamic debug mode 2025-07-10 16:04:42 +02:00
sdhci_am654.c mmc: sdhci_am654: Workaround for Errata i2312 2025-07-24 08:56:26 +02:00
sdhci_f_sdh30.c mmc: sdhci_f_sdh30: Use sdhci_pltfm_remove() 2023-08-15 13:35:27 +02:00
sdhci_f_sdh30.h mmc: f-sdh30: Add support for non-removable media 2022-12-07 13:22:36 +01:00
sdricoh_cs.c mmc: sdricoh_cs: remove unused sdricoh_readw function 2023-03-24 16:48:01 +01:00
sh_mmcif.c mmc: sh_mmcif: Advance sg_miter before reading blocks 2024-02-28 13:31:31 +01:00
sunplus-mmc.c mmc: sunplus-mmc: Convert to platform remove callback returning void 2023-08-15 12:48:20 +02:00
sunxi-mmc.c mmc: sunxi-mmc: Fix A100 compatible description 2024-11-12 18:22:57 +01:00
tifm_sd.c mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
tmio_mmc.h mmc: sdhi: Convert from tasklet to BH workqueue 2024-07-08 11:35:18 +02:00
tmio_mmc_core.c mmc: tmio: Use MMC core APIs to control the vqmmc regulator 2024-08-26 13:01:49 +02:00
toshsd.c mmc: toshsd: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
toshsd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
uniphier-sd.c - New Drivers 2024-07-17 17:42:20 -07:00
usdhi6rol0.c mmc: usdhi60rol0: Convert to platform remove callback returning void 2023-08-15 12:45:06 +02:00
ushc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
via-sdmmc.c mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
vub300.c mmc: vub300: fix an error code 2023-11-03 12:04:34 +01:00
wbsd.c mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
wbsd.h mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
wmt-sdmmc.c mmc: wmt-sdmmc: remove an incorrect release_mem_region() call in the .remove function 2024-03-05 12:50:58 +01:00