]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Wait until link state trainsits to U0 after setting USB_SS_PORT_LS_U0
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Thu, 12 Mar 2020 14:45:15 +0000 (16:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:03 +0000 (16:33 +0200)
commit3ce8455e327569d0d8f06a17701590991aaa8814
treed31e7def2bab6708648917dc9aa887d2d893bb69
parent38545c4f0abcf436f74678c89ca989682d2024ce
xhci: Wait until link state trainsits to U0 after setting USB_SS_PORT_LS_U0

[ Upstream commit 2bee9c09810f472f5d2b6e5577af441c0fce4ccb ]

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>
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.h