From: Lukas Wunner <lukas@wunner.de>
To: "Derek J. Clark" <derekjohn.clark@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] pci: quirks: Disable native PCIe hotplug on MSI Claw A8 root bridge
Date: Fri, 7 Aug 2026 10:53:47 +0200 [thread overview]
Message-ID: <anWdGzfD7HxglsOB@wunner.de> (raw)
In-Reply-To: <20260806214808.1202819-1-derekjohn.clark@gmail.com>
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
prev parent reply other threads:[~2026-08-07 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=anWdGzfD7HxglsOB@wunner.de \
--to=lukas@wunner.de \
--cc=bhelgaas@google.com \
--cc=derekjohn.clark@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=pgriffais@valvesoftware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox