From 36beb6d952d7f6ec84b13b549f6981cead8f479a Mon Sep 17 00:00:00 2001 From: Matthew Schwartz Date: Sat, 20 Dec 2025 19:57:41 -0800 Subject: [PATCH 1/3] [FROM-ML] mmc: rtsx_pci_sdmmc: drop MMC_CAP_AGGRESSIVE_PM for RTS525A Using MMC_CAP_AGGRESSIVE_PM on RTS525A card readers causes game performance issues when the card reader comes back from idle into active use. This can be observed in Hades II when loading new sections of the game or menu after the card reader puts itself into idle, and presents as a 1-2 second hang. Disabling this capability for RTS525A eliminates the performance issues. Signed-off-by: Matthew Schwartz --- drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 4db3328f46dfb..b4a531e8c8894 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1497,7 +1497,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host) mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST | MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25; - if (pcr->rtd3_en) + if (pcr->rtd3_en && PCI_PID(pcr) != PID_525A) mmc->caps = mmc->caps | MMC_CAP_AGGRESSIVE_PM; mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE | MMC_CAP2_NO_SDIO; From 6eb9ee0af6135e95926bd195b2b1203dabdedbb1 Mon Sep 17 00:00:00 2001 From: Matthew Schwartz Date: Sat, 20 Dec 2025 19:59:53 -0800 Subject: [PATCH 2/3] [FROM-ML] misc: rtsx_pcr: prevent pm_schedule_suspend for RTS525A The chip's pm_schedule_suspend sequence can sometimes cause SD card reinitialization failures with "__mmc_poll_for_busy" after reaching the end of its operations. As a workaround, skip pm_schedule_suspend for RTS525A card readers. Signed-off-by: Matthew Schwartz --- drivers/misc/cardreader/rtsx_pcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c index f9952d76d6ed7..5e5d451b75b78 100644 --- a/drivers/misc/cardreader/rtsx_pcr.c +++ b/drivers/misc/cardreader/rtsx_pcr.c @@ -1761,7 +1761,7 @@ static int rtsx_pci_runtime_idle(struct device *device) mutex_unlock(&pcr->pcr_mutex); - if (pcr->rtd3_en) + if (pcr->rtd3_en && PCI_PID(pcr) != PID_525A) pm_schedule_suspend(device, 10000); return -EBUSY; From 4e8bee4d9090c895c657642848d45d4378794c01 Mon Sep 17 00:00:00 2001 From: Matthew Schwartz Date: Sat, 20 Dec 2025 19:49:24 -0800 Subject: [PATCH 3/3] [FROM-ML] mmc: rtsx_pci_sdmmc: increase delay after power on for SD cards An mdelay of 1 leads to unreliable SD card initialization on some cards, such as SanDisk Extreme PRO UHS-I microSD models, where they will be in a "card stuck busy" state after power on. Increasing the delay to 10 ms improves reliability from a 20% failure rate to 0% on two devices with RTS525A card readers after testing 30 s2idle/resume cycles. Signed-off-by: Matthew Schwartz --- drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index b4a531e8c8894..adaaadf3015a7 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -937,7 +937,7 @@ static int sd_power_on(struct realtek_pci_sdmmc *host, unsigned char power_mode) if (err < 0) return err; - mdelay(1); + mdelay(10); err = rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, SD_OUTPUT_EN); if (err < 0)