From 0f389940d79b9ff8bfb5ea49cd88f379d24a73a0 Mon Sep 17 00:00:00 2001 From: Basavaraj Natikar Date: Wed, 12 Mar 2025 22:51:00 +0900 Subject: [PATCH] xhci: Allow RPM on the USB controller (1022:43f7) by default BugLink: https://bugs.launchpad.net/bugs/2102118 [ Upstream commit 28cbed496059fe1868203b76e9e0ef285733524d ] Enable runtime PM by default for older AMD 1022:43f7 xHCI 1.1 host as it is proven to work. Driver enables runtime PM by default for newer xHCI 1.2 host. Link: https://lore.kernel.org/all/12335218.O9o76ZdvQC@natalenko.name/ Cc: Mario Limonciello Tested-by: Oleksandr Natalenko Signed-off-by: Basavaraj Natikar Acked-by: Mathias Nyman Link: https://lore.kernel.org/r/20240304054327.2564500-1-Basavaraj.Natikar@amd.com Signed-off-by: Greg Kroah-Hartman Stable-dep-of: d7b11fe57902 ("xhci: Combine two if statements for Etron xHCI host") Signed-off-by: Sasha Levin [koichiroden: adjusted considering that "xhci: remove XHCI_TRUST_TX_LENGTH quirk" was backported from v6.9.7 (LP: #2075154)] Signed-off-by: Koichiro Den Signed-off-by: Stefan Bader --- drivers/usb/host/xhci-pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 62b2a9e7b77c..fd2fa51bd01e 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -311,6 +311,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_RESET_ON_RESUME; } + if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x43f7) + xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; + if ((pdev->vendor == PCI_VENDOR_ID_AMD) && ((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) || (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) ||