Skip to content

Commit 45f750c

Browse files
matnymangregkh
authored andcommitted
xhci: Don't prevent USB2 bus suspend in state check intended for USB3 only
The code to prevent a bus suspend if a USB3 port was still in link training also reacted to USB2 port polling state. This caused bus suspend to busyloop in some cases. USB2 polling state is different from USB3, and should not prevent bus suspend. Limit the USB3 link training state check to USB3 root hub ports only. The origial commit went to stable so this need to be applied there as well Fixes: 2f31a67 ("usb: xhci: Prevent bus suspend if a port connect change or polling state is detected") Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 40e020c commit 45f750c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/usb/host/xhci-hub.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,8 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
15071507
portsc_buf[port_index] = 0;
15081508

15091509
/* Bail out if a USB3 port has a new device in link training */
1510-
if ((t1 & PORT_PLS_MASK) == XDEV_POLLING) {
1510+
if ((hcd->speed >= HCD_USB3) &&
1511+
(t1 & PORT_PLS_MASK) == XDEV_POLLING) {
15111512
bus_state->bus_suspended = 0;
15121513
spin_unlock_irqrestore(&xhci->lock, flags);
15131514
xhci_dbg(xhci, "Bus suspend bailout, port in polling\n");

0 commit comments

Comments
 (0)