Skip to content

Commit 191edc5

Browse files
khfenggregkh
authored andcommitted
xhci: Fix front USB ports on ASUS PRIME B350M-A
When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the xHC stops working: [ 549.114587] xhci_hcd 0000:02:00.0: WARN: xHC CMD_RUN timeout [ 549.114608] suspend_common(): xhci_pci_suspend+0x0/0xc0 returns -110 [ 549.114638] xhci_hcd 0000:02:00.0: can't suspend (hcd_pci_runtime_suspend returned -110) Delay before running xHC command CMD_RUN can workaround the issue. Use a new quirk to make the delay only targets to the affected xHC. Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d56e57c commit 191edc5

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

drivers/usb/host/xhci-pci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
126126
if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_find_chipset_info())
127127
xhci->quirks |= XHCI_AMD_PLL_FIX;
128128

129+
if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x43bb)
130+
xhci->quirks |= XHCI_SUSPEND_DELAY;
131+
129132
if (pdev->vendor == PCI_VENDOR_ID_AMD)
130133
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
131134

drivers/usb/host/xhci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,9 @@ int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup)
877877
clear_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags);
878878
del_timer_sync(&xhci->shared_hcd->rh_timer);
879879

880+
if (xhci->quirks & XHCI_SUSPEND_DELAY)
881+
usleep_range(1000, 1500);
882+
880883
spin_lock_irq(&xhci->lock);
881884
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
882885
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &xhci->shared_hcd->flags);

drivers/usb/host/xhci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,7 @@ struct xhci_hcd {
18261826
#define XHCI_U2_DISABLE_WAKE (1 << 27)
18271827
#define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28)
18281828
#define XHCI_HW_LPM_DISABLE (1 << 29)
1829+
#define XHCI_SUSPEND_DELAY (1 << 30)
18291830

18301831
unsigned int num_active_eps;
18311832
unsigned int limit_active_eps;

0 commit comments

Comments
 (0)