Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xhci: use default USB_RESUME_TIMEOUT when resuming ports.

USB2 host inititated resume, and system suspend bus resume
need to use the same USB_RESUME_TIMEOUT as elsewhere.

This resolves a device disconnect issue at system resume seen
on Intel Braswell and Apollolake, but is in no way limited to
those platforms.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Mathias Nyman and committed by
Greg Kroah-Hartman
7d3b016a 346e9973

+2 -2
+2 -2
drivers/usb/host/xhci-hub.c
··· 1166 1166 xhci_set_link_state(xhci, port_array, wIndex, 1167 1167 XDEV_RESUME); 1168 1168 spin_unlock_irqrestore(&xhci->lock, flags); 1169 - msleep(20); 1169 + msleep(USB_RESUME_TIMEOUT); 1170 1170 spin_lock_irqsave(&xhci->lock, flags); 1171 1171 xhci_set_link_state(xhci, port_array, wIndex, 1172 1172 XDEV_U0); ··· 1447 1447 1448 1448 if (need_usb2_u3_exit) { 1449 1449 spin_unlock_irqrestore(&xhci->lock, flags); 1450 - msleep(20); 1450 + msleep(USB_RESUME_TIMEOUT); 1451 1451 spin_lock_irqsave(&xhci->lock, flags); 1452 1452 } 1453 1453