Re: [PATCH v2 0/2] rtsx_usb: fix tray-reader false card detect and autosuspend

Greg Kroah-Hartman <[email protected]> Fri, 10 Jul 2026 16:23:15 +0200
Newsgroups org.kernel.vger.linux-mmc,org.kernel.vger.linux-kernel
Message-ID <2026071004-stallion-profanity-cef3@gregkh>
On Fri, Jul 10, 2026 at 03:21:51PM +0200, Ulf Hansson wrote:
> On Mon, Jul 6, 2026 at 5:40 PM Sean Rhodes <[email protected]> wrote:
> >
> > This series fixes the empty-tray detect loop seen on a Realtek RTS5129
> > USB SD reader, while also avoiding USB register accesses from the USB
> > runtime autosuspend callback.
> >
> > Compared with the previous RFC, this no longer qualifies media by issuing
> > SD/MMC commands from ->get_cd().  The rtsx_usb_sdmmc child still reports
> > the raw card-detect state initially, then lets the normal MMC rescan path
> > probe the media.  If an initialization command times out before a card is
> > attached, the SD child suppresses the raw SD_CD signal until the tray/card
> > detect line drops again.
> >
> > The parent rtsx_usb change removes USB I/O from runtime autosuspend and
> > keeps only the existing Memory Stick autosuspend deferral based on cached
> > card-status bits.  Raw SD_CD is not used as a parent autosuspend blocker,
> > because this reader can assert it for an empty tray.
> >
> > Runtime-tested on a StarLite Mk V with Realtek RTS5129 (0bda:0129), using
> > these changes as a matched rtsx_usb/rtsx_usb_sdmmc/rtsx_usb_ms module set
> > on Linux 7.0.0-27-generic.
> >
> > Device enumeration:
> >   Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
> >   /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/12p, 480M
> >       |__ Port 004: Dev 003, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
> >
> > Card inserted:
> >   mmc0: new UHS-I speed SDR50 SDXC card at address 544c
> >   mmcblk0: mmc0:544c LX2TB 1.82 TiB
> >    mmcblk0: p1
> >
> > Deep S3 with the card inserted:
> >   PM: suspend entry (deep)
> >   ACPI: PM: Waking up from system sleep state S3
> >   PM: suspend exit
> >
> > After resume, the card remained visible:
> >   NAME         SIZE TYPE FSTYPE MOUNTPOINTS
> >   mmcblk0      1.8T disk
> >   `-mmcblk0p1  1.8T part exfat
> >
> > Empty tray:
> >   mmc0: card 544c removed
> >   /sys/bus/usb/devices/1-4/power/control=auto
> >   /sys/bus/usb/devices/1-4/power/runtime_status=suspended
> >   /sys/bus/usb/devices/1-4/power/runtime_usage=0
> >
> > With the empty tray left inserted for about three minutes, no repeated
> > MMC detect attempts, command timeouts, or USB reset churn were observed.
> >
> > Sean Rhodes (2):
> >   misc: rtsx_usb: avoid USB I/O in runtime autosuspend
> >   mmc: rtsx_usb_sdmmc: suppress false CD after init timeout
> >
> >  drivers/misc/cardreader/rtsx_usb.c | 26 ++++++++++++++++++++------
> >  drivers/mmc/host/rtsx_usb_sdmmc.c  | 13 ++++++++++++-
> >  include/linux/rtsx_usb.h           |  3 +++
> >  3 files changed, 35 insertions(+), 7 deletions(-)
> >
> 
> I decided to queue the series for next to get it thoroughly tested.
> Potentially we should also tag these for stable kernels, but let's get
> it tested a bit more in next first.
> 
> Greg, please let me know if you have any objections that I pick this
> via my mmc tree, or please provide your ack.

No objection from me:

Acked-by: Greg Kroah-Hartman <[email protected]>