Skip to content
Snippets Groups Projects
Commit 08979374 authored by prike Liang's avatar prike Liang Committed by Alex Deucher
Browse files

usb: pci-quirks: disable D3cold on AMD xhci suspend for s2idle


The XHCI Renoir USB 3.1 resume failed caused by CNR bit not cleared during s2idle resume.
This issue can be workaround by disable the D3cold support on Renoir USB 3.1.

Signed-off-by: default avatarPrike Liang <Prike.Liang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5f1f90d2
No related branches found
No related tags found
No related merge requests found
...@@ -181,6 +181,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) ...@@ -181,6 +181,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
(pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1))) (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1)))
xhci->quirks |= XHCI_U2_DISABLE_WAKE; xhci->quirks |= XHCI_U2_DISABLE_WAKE;
if (pdev->vendor == PCI_VENDOR_ID_AMD &&
pdev->device == 0x1639)
xhci->quirks |= XHCI_AMD_S2IDL_SUPPORT_QUIRK;
if (pdev->vendor == PCI_VENDOR_ID_INTEL) { if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_INTEL_HOST; xhci->quirks |= XHCI_INTEL_HOST;
...@@ -529,7 +533,7 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) ...@@ -529,7 +533,7 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
* Systems with the TI redriver that loses port status change events * Systems with the TI redriver that loses port status change events
* need to have the registers polled during D3, so avoid D3cold. * need to have the registers polled during D3, so avoid D3cold.
*/ */
if (xhci->quirks & XHCI_COMP_MODE_QUIRK) if (xhci->quirks & (XHCI_COMP_MODE_QUIRK | XHCI_AMD_S2IDL_SUPPORT_QUIRK))
pci_d3cold_disable(pdev); pci_d3cold_disable(pdev);
if (xhci->quirks & XHCI_PME_STUCK_QUIRK) if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
......
...@@ -1883,6 +1883,7 @@ struct xhci_hcd { ...@@ -1883,6 +1883,7 @@ struct xhci_hcd {
#define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_SKIP_PHY_INIT BIT_ULL(37)
#define XHCI_DISABLE_SPARSE BIT_ULL(38) #define XHCI_DISABLE_SPARSE BIT_ULL(38)
#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39) #define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39)
#define XHCI_AMD_S2IDL_SUPPORT_QUIRK BIT_ULL(40)
unsigned int num_active_eps; unsigned int num_active_eps;
unsigned int limit_active_eps; unsigned int limit_active_eps;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment