diff options
author | Basavaraj Natikar <Basavaraj.Natikar@amd.com> | 2023-04-28 19:30:56 +0530 |
---|---|---|
committer | Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> | 2023-11-02 16:05:17 -0700 |
commit | 1a5e1c84aa1faf57a2d4fbb041659acd6205cb54 (patch) | |
tree | 8945ea1d2a8938bd3195d8c3036d7b9e34c26b22 /drivers/usb/host | |
parent | 5363aaaa0e740b46556dc3bbc996fef920f56c43 (diff) | |
download | linux-1a5e1c84aa1faf57a2d4fbb041659acd6205cb54.tar.gz |
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: 253f588c70f6 ("xhci: Improve detection of device initiated wake signal.") Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20230428140056.1318981-3-Basavaraj.Natikar@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 80faae156cce..e72a04f6153b 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1283,7 +1283,7 @@ int xhci_resume(struct xhci_hcd *xhci, pm_message_t msg) * the first wake signalling failed, give it that chance. */ pending_portevent = xhci_pending_portevent(xhci); - if (!pending_portevent) { + if (!pending_portevent && msg.event == PM_EVENT_AUTO_RESUME) { msleep(120); pending_portevent = xhci_pending_portevent(xhci); } |