* [PATCH v2] pci: quirks: Disable native PCIe hotplug on MSI Claw A8 root bridge
@ 2026-08-06 21:48 Derek J. Clark
2026-08-07 8:53 ` Lukas Wunner
0 siblings, 1 reply; 2+ messages in thread
From: Derek J. Clark @ 2026-08-06 21:48 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Pierre-Loup A . Griffais, Derek J . Clark, linux-pci,
linux-kernel
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 reader's
PCIe endpoint is fixed/soldered and not user-hotpluggable.
Firmware advertises this root port as PCIe hotplug-capable, and _OSC
grants the OS native hotplug control. 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.
Two kernel command line parameters were confirmed to prevent the hang:
pcie_aspm=off and pcie_ports=compat. Both stop the OS from running
its own hotplug/PME resume path against this port. The former does
so by dropping _OSC negotiation during boot, skipping the path that
enables PCIeHotPlug. The latter prevents the PME service resume
handling by aborting registration of the ports native services. Testing
different kernel boot commands, including pciehp=off and pcie_pme=off
did not resolve the issue. AER, DPC, SHPC, and LTR flags were not tested
because the hardware reports that the platform doesn't support those
features.
This quirk implements as narrow a fix as possible, clearing
is_hotplug_bridge and is_pciehp on the root bridge, scoped by DMI board
name and this root port's bus/device/function, so the port driver never
registers a native hotplug service against it.
SD card insertion is handled entirely by rtsx_pci's own card-detect logic,
so is unaffected by this quirk.
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
---
v2:
- Switch to pci_info vice dev_info.
- use is_hotplug_bridge and is_pciehp on the root port instead of
native_pcie_hotplug on the root bridge.
v1: https://lore.kernel.org/linux-pci/20260806190439.12022-1-derekjohn.clark@gmail.com/
---
drivers/pci/quirks.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 6501c949c5b7..62480fe10bcd 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -6420,3 +6420,26 @@ static void pci_mask_replay_timer_timeout(struct pci_dev *pdev)
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_GLI, 0x9750, pci_mask_replay_timer_timeout);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_GLI, 0x9755, pci_mask_replay_timer_timeout);
#endif
+
+/*
+ * 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);
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] pci: quirks: Disable native PCIe hotplug on MSI Claw A8 root bridge
2026-08-06 21:48 [PATCH v2] pci: quirks: Disable native PCIe hotplug on MSI Claw A8 root bridge Derek J. Clark
@ 2026-08-07 8:53 ` Lukas Wunner
0 siblings, 0 replies; 2+ messages in thread
From: Lukas Wunner @ 2026-08-07 8:53 UTC (permalink / raw)
To: Derek J. Clark
Cc: Bjorn Helgaas, Pierre-Loup A . Griffais, linux-pci, linux-kernel
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/20260707021527.639611-1-max.lee@canonical.com/
> 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/20231016040132.23824-1-kai.heng.feng@canonical.com/
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-07 8:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 21:48 [PATCH v2] pci: quirks: Disable native PCIe hotplug on MSI Claw A8 root bridge Derek J. Clark
2026-08-07 8:53 ` Lukas Wunner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox