xhci: Add reset resume quirk for AMD xhci controller.
authorSandeep Singh <sandeep.singh@amd.com>
Wed, 12 May 2021 08:08:16 +0000 (11:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:59:46 +0000 (10:59 +0200)
commit 3c128781d8da463761495aaf8898c9ecb4e71528 upstream.

One of AMD xhci controller require reset on resume.
Occasionally AMD xhci controller does not respond to
Stop endpoint command.
Once the issue happens controller goes into bad state
and in that case controller needs to be reset.

Cc: <stable@vger.kernel.org>
Signed-off-by: Sandeep Singh <sandeep.singh@amd.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210512080816.866037-6-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-pci.c

index 42ff11e3c4dcfb276a61ca7e03116a2139bc6ff4..19485c076ba30c11c80fef54886e6f6cdb94ff76 100644 (file)
@@ -144,8 +144,10 @@ 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) {
                xhci->quirks |= XHCI_DISABLE_SPARSE;
+               xhci->quirks |= XHCI_RESET_ON_RESUME;
+       }
 
        if (pdev->vendor == PCI_VENDOR_ID_AMD)
                xhci->quirks |= XHCI_TRUST_TX_LENGTH;