diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index be041bd65b19..d81d4aee1292 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1133,6 +1133,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) int retval = 0; bool comp_timer_running = false; bool pending_portevent = false; + bool suspended_usb3_devs = false; bool reinit_xhc = false; if (!hcd->state) @@ -1282,10 +1283,16 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) /* * Resume roothubs only if there are pending events. * USB 3 devices resend U3 LFPS wake after a 100ms delay if - * the first wake signalling failed, give it that chance. + * the first wake signalling failed, give it that chance if + * there are suspended USB 3 devices. */ + if (xhci->usb3_rhub.bus_state.suspended_ports || + xhci->usb3_rhub.bus_state.bus_suspended) + suspended_usb3_devs = true; + pending_portevent = xhci_pending_portevent(xhci); - if (!pending_portevent) { + + if (suspended_usb3_devs && !pending_portevent) { msleep(120); pending_portevent = xhci_pending_portevent(xhci); }