From: Lukas Wunner <lukas@wunner.de>
To: Derek John 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: Sat, 8 Aug 2026 10:16:42 +0200 [thread overview]
Message-ID: <anbl6j9DWiyVQLqS@wunner.de> (raw)
In-Reply-To: <CAFqHKTm_dHnSP-ceJhbsm3Zsiif+vxM-xqK27b4eXQGQo1Y7Eg@mail.gmail.com>
On Fri, Aug 07, 2026 at 05:31:04PM -0700, Derek John Clark wrote:
> [ 25.686128] rtsx_pci 0000:c2:00.0: pciehp: pdev subsystem vendor ID mismatch
[...]
> reg=0x525a10ec expected=0x14af1462
The subsystem vendor ID was 0x1462 (MSI) when the card reader was
enumerated on boot and it is 0x10ec (Realtek) on resume.
Likewise the subystem device ID was 0x14af on boot, 0x525a on resume.
It's another bug in the MSI BIOS (in addition to marking the Root Port
hotplug-capable): The BIOS neglected to re-initialize the subsystem
vendor/device ID registers in config space on resume to the same
values that it set on boot. The card reader was likely reset while
going through the system sleep transition and its config space
thus needs to be re-initialized.
What happens is that pciehp marks the card reader disconnected
because it assumes that it was replaced during system sleep.
It then synthesizes a Presence Detect Changed event:
https://elixir.bootlin.com/linux/v7.2-rc6/source/drivers/pci/hotplug/pciehp_core.c#L300
So the pciehp interrupt thread pciehp_ist() will remove the
rtsx_pci driver and de-enumerate the device.
Replacing or removing PCIe devices during system sleep happens
all the time (e.g. with Thunderbolt) and we haven't seen issues
with regards to that. The likelihood is higher that the lockup
is caused by rtsx_pci.
Maybe rtsx_pci_remove() blocks somewhere and prevents forward
progress of the resume transition. In particular, it calls
pm_runtime_get_sync() and cancel_delayed_work_sync(), which are
blocking calls, i.e. they wait for something else to happen.
You could try commenting those calls out and see if it avoids
the lockup:
https://elixir.bootlin.com/linux/v7.2-rc6/source/drivers/misc/cardreader/rtsx_pcr.c#L1608
Another possibility is a crash due to a NULL pointer deref or
GPF somewhere in that driver. This is pretty difficult to debug
if there's no possibility to see any dmesg output.
Even if we manage to find the root cause of the lockup, as long as
the BIOS isn't fixed, the card reader will always be de-enumerated
and re-enumerated on resume and consequently the card will briefly
disappear. This will make it impossible to use the card as root
filesystem.
> I've been using a SanDisk Ultra 32GB microSDHC UHS-I Card. And yes, it
> only happens when the card is present.
If you go to sleep and resume without SD card, do you then see in dmesg
that the card reader was de-enumerated and re-enumerated? Normally
there should be at least a "Card not present" / "Card present" message
from pciehp, if it sensed a replaced device. ("Card" refers to PCIe card,
not SD card.)
Also, what's the subsystem vendor/device ID as seen with lspci after
a successful system sleep transition (successful = without SD card)?
Thanks,
Lukas
prev parent reply other threads:[~2026-08-08 8:16 UTC|newest]
Thread overview: 4+ 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
2026-08-08 0:31 ` Derek John Clark
2026-08-08 8:16 ` 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=anbl6j9DWiyVQLqS@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