All of lore.kernel.org
 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: Sun, 9 Aug 2026 08:22:03 +0200	[thread overview]
Message-ID: <angci4oGyGFtvbSQ@wunner.de> (raw)
In-Reply-To: <CAFqHKT=ZzWRdnNCixY5BeLsVE2JUhfmPSNnpw5TFjzu76AocrA@mail.gmail.com>

On Sat, Aug 08, 2026 at 08:34:38PM -0700, Derek John Clark wrote:
> This was good instinct. I was able to drill down and find
> approximately where it is hanging.
> 
> rtsx_pci_remove() ->mfd_remove_devices() -> mfd_remove_devices_fn() ->
> platform_device_unregister() -> platform_device_del() -> device_del()
> -> bus_remove_device() -> device_release_driver() ->
> device_release_driver_internal() -> __device_release_driver() ->
> device_remove()
> 
> In device_remove() (drivers/base/dd.c) it gets past
> device_remove_groups() and hangs before completing this if block:
> 
> if (dev->bus && dev->bus->remove)
>     dev->bus->remove(dev);
> else if (dev->driver->remove)
>     dev->driver->remove(dev);

Okay, that ->remove callback should be rtsx_pci_sdmmc_drv_remove()
in drivers/mmc/host/rtsx_pci_sdmmc.c.  Can you maybe identify where
execution stops in that function?

Basically the rtsx_pci driver creates a child device of the PCI device
and the mmc host driver binds to that child device.  Removing the
mmc host driver fails here for some reason.

> > 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.)
> 
> i get card not present, then card present, then link up.
> 
> > Also, what's the subsystem vendor/device ID as seen with lspci after
> > a successful system sleep transition (successful = without SD card)?
> 
> it reflects the Realtek device VID/PID. I also tested resume after the
> 1 cycle with it re-inserted and it works fine after the first cycle,
> presumably because the device id matches on the second run and beyond

Right, when the device is re-enumerated after the first system sleep
transition, the Realtek subdevice vendor/device ID is cached and that
matches on all subsequent system sleep transitions.  So if we manage
to find and eliminate the cause of the hang, there'll only be the
inconvenience of the removal/re-enumeration on first sleep.

Thanks,

Lukas

  reply	other threads:[~2026-08-09  6:30 UTC|newest]

Thread overview: 11+ 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-06 21:56 ` sashiko-bot
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 [this message]
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

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=angci4oGyGFtvbSQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.