[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aC7SxEzfRwmL2eBH@wunner.de>
Date: Thu, 22 May 2025 09:31:16 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Denis Benato <benato.denis96@...il.com>
Cc: Mario Limonciello <superm1@...nel.org>,
Raag Jadav <raag.jadav@...el.com>, rafael@...nel.org,
mahesh@...ux.ibm.com, oohall@...il.com, bhelgaas@...gle.com,
linux-pci@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, ilpo.jarvinen@...ux.intel.com,
aravind.iddamsetty@...ux.intel.com,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Mathias Nyman <mathias.nyman@...el.com>
Subject: Re: [PATCH v4] PCI: Prevent power state transition of erroneous
device
[cc += Mika, Mathias]
On Tue, May 20, 2025 at 07:22:04PM +0200, Denis Benato wrote:
> This is the very same exact kernel, minus the patch in question:
> https://pastebin.com/rwMYgG7C
I note that your machine uses an Intel Maple Ridge 2C Thunderbolt
controller. It looks like we're missing that one in the list of
XHCI devices which are allowed to runtime suspend. Only the 4C
variant of that controller was allowed to runtime suspend by commit
5a8e3229ac27 ("xhci-pci: Allow host runtime PM as default for Intel
Maple Ridge xHCI").
Commit a611bf473d1f ("xhci-pci: Set runtime PM as default policy on
all xHC 1.2 or later devices") has since obviated the need to
continuously amend the list of controllers, but it's unclear to me
whether it encompasses Maple Ridge 2C or not. Chances are it doesn't
because the 4C variant was kept in the whitelist.
What do you get if you run:
cat /sys/bus/pci/devices/0000:38:00.0/power/runtime_enabled
cat /sys/bus/pci/devices/0000:38:00.0/power/runtime_status
Below is a small patch to add the 2C variant to the whitelist.
Does it help in any way? What's the output for the two commands
above if you apply the patch?
Upthread it was said that it's a problem if the Root Port stays in D0.
Of course if the XHCI doesn't runtime suspend, that will keep the
Root Port in D0 as well. The patch may eliminate one reason for the
Root Port to stay in D0.
The PCI IDs database was also missing the IDs of the 2C variant,
I just went ahead and fixed that.
Thanks,
Lukas
-- >8 --
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 0c481cb..5233d59 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -61,7 +61,8 @@
#define PCI_DEVICE_ID_PHYTIUM_XHCI 0xdc27
/* Thunderbolt */
-#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138
+#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_2C_XHCI 0x1135
+#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_4C_XHCI 0x1138
#define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_XHCI 0x15b5
#define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_XHCI 0x15b6
#define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_XHCI 0x15c1
@@ -387,7 +388,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI ||
pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI ||
pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI ||
- pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI))
+ pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_2C_XHCI ||
+ pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_4C_XHCI))
xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
Powered by blists - more mailing lists