From: Greg Kroah-Hartman Date: Wed, 21 Jan 2026 14:50:36 +0000 (+0100) Subject: Revert "mmc: rtsx: reset power state on suspend" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c23f0550c05d40762b141808709667759291c938;p=thirdparty%2Fkernel%2Flinux.git Revert "mmc: rtsx: reset power state on suspend" This reverts commit eac85fbd0867c25ac517f58fae401d65c627edff. This is not the correct change, so revert it for now. Fixes: eac85fbd0867 ("mmc: rtsx: reset power state on suspend") Cc: Matthew Schwartz Cc: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c index f1f4d8ed544d..f9952d76d6ed 100644 --- a/drivers/misc/cardreader/rtsx_pcr.c +++ b/drivers/misc/cardreader/rtsx_pcr.c @@ -1654,7 +1654,6 @@ static int __maybe_unused rtsx_pci_suspend(struct device *dev_d) struct pci_dev *pcidev = to_pci_dev(dev_d); struct pcr_handle *handle = pci_get_drvdata(pcidev); struct rtsx_pcr *pcr = handle->pcr; - struct rtsx_slot *slot = &pcr->slots[RTSX_SD_CARD]; dev_dbg(&(pcidev->dev), "--> %s\n", __func__); @@ -1662,9 +1661,6 @@ static int __maybe_unused rtsx_pci_suspend(struct device *dev_d) mutex_lock(&pcr->pcr_mutex); - if (slot->p_dev && slot->power_off) - slot->power_off(slot->p_dev); - rtsx_pci_power_off(pcr, HOST_ENTER_S3, false); mutex_unlock(&pcr->pcr_mutex); @@ -1776,17 +1772,12 @@ static int rtsx_pci_runtime_suspend(struct device *device) struct pci_dev *pcidev = to_pci_dev(device); struct pcr_handle *handle = pci_get_drvdata(pcidev); struct rtsx_pcr *pcr = handle->pcr; - struct rtsx_slot *slot = &pcr->slots[RTSX_SD_CARD]; dev_dbg(device, "--> %s\n", __func__); cancel_delayed_work_sync(&pcr->carddet_work); mutex_lock(&pcr->pcr_mutex); - - if (slot->p_dev && slot->power_off) - slot->power_off(slot->p_dev); - rtsx_pci_power_off(pcr, HOST_ENTER_S3, true); mutex_unlock(&pcr->pcr_mutex); diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index b847d79d4d8c..5d3599ee06bf 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -47,7 +47,6 @@ struct realtek_pci_sdmmc { }; static int sdmmc_init_sd_express(struct mmc_host *mmc, struct mmc_ios *ios); -static int sd_power_on(struct realtek_pci_sdmmc *host, unsigned char power_mode); static inline struct device *sdmmc_dev(struct realtek_pci_sdmmc *host) { @@ -822,15 +821,6 @@ static void sd_request(struct work_struct *work) rtsx_pci_start_run(pcr); - if (host->prev_power_state == MMC_POWER_OFF) { - err = sd_power_on(host, MMC_POWER_ON); - if (err) { - cmd->error = err; - mutex_unlock(&pcr->pcr_mutex); - goto finish; - } - } - rtsx_pci_switch_clock(pcr, host->clock, host->ssc_depth, host->initial_mode, host->double_clk, host->vpclk); rtsx_pci_write_register(pcr, CARD_SELECT, 0x07, SD_MOD_SEL); @@ -1491,16 +1481,6 @@ static void rtsx_pci_sdmmc_card_event(struct platform_device *pdev) mmc_detect_change(host->mmc, 0); } -static void rtsx_pci_sdmmc_power_off(struct platform_device *pdev) -{ - struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev); - - if (!host) - return; - - host->prev_power_state = MMC_POWER_OFF; -} - static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) { struct mmc_host *mmc; @@ -1533,7 +1513,6 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) platform_set_drvdata(pdev, host); pcr->slots[RTSX_SD_CARD].p_dev = pdev; pcr->slots[RTSX_SD_CARD].card_event = rtsx_pci_sdmmc_card_event; - pcr->slots[RTSX_SD_CARD].power_off = rtsx_pci_sdmmc_power_off; mutex_init(&host->host_mutex); @@ -1565,7 +1544,6 @@ static void rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) pcr = host->pcr; pcr->slots[RTSX_SD_CARD].p_dev = NULL; pcr->slots[RTSX_SD_CARD].card_event = NULL; - pcr->slots[RTSX_SD_CARD].power_off = NULL; mmc = host->mmc; cancel_work_sync(&host->work); diff --git a/include/linux/rtsx_common.h b/include/linux/rtsx_common.h index f294f478f0c0..da9c8c6b5d50 100644 --- a/include/linux/rtsx_common.h +++ b/include/linux/rtsx_common.h @@ -32,7 +32,6 @@ struct platform_device; struct rtsx_slot { struct platform_device *p_dev; void (*card_event)(struct platform_device *p_dev); - void (*power_off)(struct platform_device *p_dev); }; #endif