summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorKai-Heng Feng <kai.heng.feng@canonical.com>2020-03-12 16:45:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-29 16:33:03 +0200
commitea6f7011c42db70b6380480d0561d8f9402d6f76 (patch)
treed31e7def2bab6708648917dc9aa887d2d893bb69 /drivers/usb/host/xhci.h
parente650a264df6f72701874f6eab11fdb28a861515e (diff)
downloadlinux-stable-ea6f7011c42db70b6380480d0561d8f9402d6f76.tar.gz
xhci: Wait until link state trainsits to U0 after setting USB_SS_PORT_LS_U0
[ Upstream commit 0200b9f790b0fc9e9a42f685f5ad54b23fe959f4 ] Like U3 case, xHCI spec doesn't specify the upper bound of U0 transition time. The 20ms is not enough for some devices. Intead of polling PLS or PLC, we can facilitate the port change event to know that the link transits to U0 is completed. While at it, also separate U0 and U3 case to make the code cleaner. [variable rename to u3exit, and skip completion for usb2 ports -Mathias ] Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20200312144517.1593-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 98b98a0cd2a8..3ad4f80960d0 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1694,6 +1694,7 @@ struct xhci_bus_state {
/* Which ports are waiting on RExit to U0 transition. */
unsigned long rexit_ports;
struct completion rexit_done[USB_MAXCHILDREN];
+ struct completion u3exit_done[USB_MAXCHILDREN];
};