The Linux Kernel Mailing List
 help / color / mirror / Atom feed
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: Wed, 12 Aug 2026 20:20:34 +0200	[thread overview]
Message-ID: <any5ciFCjh-0cGkB@wunner.de> (raw)
In-Reply-To: <anqw0M6cQLEA0J6d@wunner.de>

On Tue, Aug 11, 2026 at 07:19:12AM +0200, Lukas Wunner wrote:
> On Mon, Aug 10, 2026 at 01:57:58PM -0700, Derek John Clark wrote:
> > I suppose that is true, but in that case we still wouldn't be able to
> > use it as the root fs since it gets removed/re-added during a suspend.
> > Would the quirk I submitted not have this compromise?
> 
> Okay I wasn't sure that using the MMC card as root filesystem
> is even possible on this product.  If that's a potential use case,
> it needs a separate fix.  I'll come up with a proposal for that one
> as well.

Here's my proposal for allowing root on an MMC card.

Both this and the other patch I just sent (or something like it)
need to be submitted upstream.  The other one is necessary so others
don't see a lockup when disconnecting e.g. a Thunderbolt-attached
card reader during system sleep.

But either one of the patches should make the issue go away on the
MSI Claw, so each patch needs to be tested by itself, without applying
the other one as well.  Thanks!

-- >8 --

diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index b301c6c8df75..9da7ae0b2437 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -1080,4 +1080,20 @@ static void quirk_tuxeo_rp_d3(struct pci_dev *pdev)
 	}
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1502, quirk_tuxeo_rp_d3);
+
+/*
+ * MSI Claw A8 firmware initializes the onboard Realtek RTS525A cardreader
+ * with an MSI-specific Subsystem Vendor and Device ID on boot, but neglects
+ * to re-initialize it on resume.  Avoid hot-removal of the cardreader due to
+ * the spurious ID change.
+ */
+static void quirk_msi_claw_cardreader(struct pci_dev *pdev)
+{
+	if (pdev->subsystem_vendor == 0x1462 &&
+	    pdev->subsystem_device == 0x14af) {
+		pdev->subsystem_vendor = pdev->vendor;
+		pdev->subsystem_device = pdev->device;
+	}
+}
+DECLARE_PCI_FIXUP_SUSPEND_LATE(PCI_VENDOR_ID_REALTEK, 0x525a, quirk_msi_claw_cardreader);
 #endif /* CONFIG_SUSPEND */

  parent reply	other threads:[~2026-08-12 18:20 UTC|newest]

Thread overview: 14+ 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
2026-08-09  3:34       ` Derek John Clark
2026-08-09  6:22         ` Lukas Wunner
2026-08-10 20:57           ` Derek John Clark
2026-08-11  5:19             ` Lukas Wunner
2026-08-11  8:59               ` Lukas Wunner
2026-08-11  9:19                 ` Derek J. Clark
2026-08-12 18:13                 ` Lukas Wunner
2026-08-12 20:14                   ` Derek John Clark
2026-08-12 18:20               ` Lukas Wunner [this message]
2026-08-12 20:16                 ` Derek John Clark

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=any5ciFCjh-0cGkB@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