Commit 1c024241 authored by Basavaraj Natikar's avatar Basavaraj Natikar Committed by Greg Kroah-Hartman

xhci: Improve the XHCI system resume time

Avoid extra 120ms delay during system resume.

The xHC controller may signal wake up to 120ms before showing which usb
device caused the wake on the xHC port registers.

The xhci driver therefore checks for port activity up to 120ms during
resume, making sure that the hub driver can see the port change, and
won't immediately runtime suspend back due to no port activity.

This is however only needed for runtime resume as system resume will
resume all child hubs and other child usb devices anyway.

Fixes: 253f588c ("xhci: Improve detection of device initiated wake signal.")
Signed-off-by: default avatarBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Acked-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20230428140056.1318981-3-Basavaraj.Natikar@amd.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f7d5520
...@@ -1117,7 +1117,7 @@ int xhci_resume(struct xhci_hcd *xhci, pm_message_t msg) ...@@ -1117,7 +1117,7 @@ int xhci_resume(struct xhci_hcd *xhci, pm_message_t msg)
* the first wake signalling failed, give it that chance. * the first wake signalling failed, give it that chance.
*/ */
pending_portevent = xhci_pending_portevent(xhci); pending_portevent = xhci_pending_portevent(xhci);
if (!pending_portevent) { if (!pending_portevent && msg.event == PM_EVENT_AUTO_RESUME) {
msleep(120); msleep(120);
pending_portevent = xhci_pending_portevent(xhci); pending_portevent = xhci_pending_portevent(xhci);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment