]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mmc: rtsx: reset power state on suspend
authorMatthew Schwartz <matthew.schwartz@linux.dev>
Mon, 5 Jan 2026 06:02:35 +0000 (22:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jan 2026 15:36:50 +0000 (16:36 +0100)
commiteac85fbd0867c25ac517f58fae401d65c627edff
treea6d68286242a5497f03623efb10040e90b812b88
parent5f0bf80cc5e04d31eeb201683e0b477c24bd18e7
mmc: rtsx: reset power state on suspend

When rtsx_pci suspends, the card reader hardware powers off but the sdmmc
driver's prev_power_state remains as MMC_POWER_ON. This causes sd_power_on
to skip reinitialization on the next I/O request, leading to DMA transfer
timeouts and errors on resume 20% of the time.

Add a power_off slot callback so the PCR can notify the sdmmc driver
during suspend. The sdmmc driver resets prev_power_state, and sd_request
checks this to reinitialize the card before the next I/O.

Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
Link: https://patch.msgid.link/20260105060236.400366-2-matthew.schwartz@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cardreader/rtsx_pcr.c
drivers/mmc/host/rtsx_pci_sdmmc.c
include/linux/rtsx_common.h