diff mbox series

[1/1,SRU,L,OEM-6.1] UBUNTU: SAUCE: usb: xhci: Workaround for runpm issue on AMD xHC

Message ID 20230216085606.86587-2-acelan.kao@canonical.com
State New
Headers show
Series Built-in camera device dies after runtime suspended | expand

Commit Message

AceLan Kao Feb. 16, 2023, 8:56 a.m. UTC
From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>

BugLink: https://launchpad.net/bugs/2007530

When the xHC host is runtime suspended, the device connects to it will be
disconnected while trying to use it.
The quirk in commit 2a632815683d ("usb: xhci: Workaround for S3 issue on
AMD SNPS 3.0 xHC") also works for this issue, so added its ID to the
quirk, too.

05:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:1505] (prog-if 30 [XHCI])
        Subsystem: Dell Device [1028:0c3f]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 60
        IOMMU group: 21
        Region 0: Memory at c0000000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: <access denied>
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci

[   20.769275] xhci_hcd 0000:05:00.0: xHCI host not responding to stop endpoint command
[   20.771429] xhci_hcd 0000:05:00.0: xHCI host controller not responding, assume dead
[   20.771444] xhci_hcd 0000:05:00.0: HC died; cleaning up
[   20.771733] usb 5-1: USB disconnect, device number 2

(Cherry picked from commi https://www.spinics.net/lists/kernel/msg4689370.html)
Cc: stable@vger.kernel.org #v4.19+
Change-Id: I16f7b53e64c58b094b8050b8adc82d7f91a4d94e
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
---
 drivers/usb/host/xhci-pci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index f98cf30a3c1a5..493a5daf3bb93 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -174,7 +174,9 @@  static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 	    (pdev->device == 0x15e0 || pdev->device == 0x15e1))
 		xhci->quirks |= XHCI_SNPS_BROKEN_SUSPEND;
 
-	if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x15e5) {
+	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+		(pdev->device == 0x15e5 ||
+		 pdev->device == 0x1505)) {
 		xhci->quirks |= XHCI_DISABLE_SPARSE;
 		xhci->quirks |= XHCI_RESET_ON_RESUME;
 	}