Re: [PATCH v2] pci: quirks: Disable native PCIe hotplug on MSI Claw A8 root bridge
Lukas Wunner <[email protected]>
| Newsgroups | org.kernel.vger.linux-pci,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Aug 06, 2026 at 09:48:08PM +0000, Derek J. Clark wrote: > The MSI Claw A8 (MS-1T8K) hard-locks on resume from s2idle whenever an > SD/MMC card is present in the onboard Realtek RTS525A card reader > (10ec:525a), which sits behind root port 0000:00:02.2. The RTS525A is known to falsely claim that it supports ASPM L0s, even though it only supports L1. There is a patch pending to work around this hardware erratum, I'm wondering whether it makes the issue go away on the MSI Claw A8? https://lore.kernel.org/r/[email protected]/ > The reader's PCIe endpoint is fixed/soldered and not user-hotpluggable. > Firmware advertises this root port as PCIe hotplug-capable That looks like an oversight on the part of MSI. Is there a BIOS update available which clears the Hot-Plug Capable bit in the Slot Capabilities Register? (I'm *assuming* that bit is set -- I haven't seen any dmesg or lspci -vvv output in your e-mails, perhaps you could open a bug at bugzilla.kernel.org and upload it there.) > When native hotplug is OS-owned, > resuming from s2idle races the port's hotplug/PME resume handling > against the RTS525A's own resume sequence when a card is present, > hard-locking the system. This sounds like a driver bug in rtsx_pci which needs to be root-caused and fixed, rather than worked around. pciehp (the OS-native PCIe hotplug driver) normally doesn't de-enumerate and re-enumerate devices on resume from system sleep. It uses a heuristic to determine whether the device in the slot was replaced during system sleep and synthesizes a hotplug event if it believes there's now a different device in the slot. Otherwise it just leaves the device in the slot alone. The replacement detection is in pciehp_device_replaced(), drivers/pci/hotplug/pciehp_hpc.c line 567. You could try hacking that function to return false and see if it helps. The heuristic looks at the Vendor ID and Device ID in config space. I do recall that a different type of card readers, RTS5261, trigger a hotplug event when a regular UHS card is replaced with an SD Express card. The card reader is hot-unplugged and the SD Express card appears as an NVMe drive with a different Device ID in config space: https://lore.kernel.org/r/[email protected]/ That said, I'm not even sure RTS525A supports SD Express. What kind of card do you have inserted in the card reader, is it UHS or SD Express? Does the issue go away if you eject the card before going to system sleep? > +++ b/drivers/pci/quirks.c [...] > +/* > + * The MSI Claw A8 firmware advertises native PCIe hotplug support for > + * this root port, but native hotplug handling causes resume failures. > + * Prevent the PCIe port driver from claiming native hotplug ownership > + * of this port. > + */ > +static void quirk_claw_a8_no_native_hotplug(struct pci_dev *pdev) > +{ > + if (!dmi_match(DMI_BOARD_NAME, "MS-1T8K")) > + return; > + > + if (pdev->bus->number != 0 || > + PCI_SLOT(pdev->devfn) != 2 || > + PCI_FUNC(pdev->devfn) != 2) > + return; > + > + pci_info(pdev, "disabling native PCIe hotplug\n"); > + pdev->is_hotplug_bridge = 0; > + pdev->is_pciehp = 0; > +} > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x150b, > + quirk_claw_a8_no_native_hotplug); Unfortunately this is just a workaround that happens to make the issue disappear, but we'd really want to identify the root cause first. If you boot with no_console_suspend, are you able to see any messages on suspend or resume that could help us understand what is going on? Thanks, Lukas