xhci: Fix port resume done detection for SS ports with LPM enabled
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 22 Mar 2019 15:50:15 +0000 (17:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:26:27 +0000 (06:26 +0200)
commitc81b872281a12a26a945f8acc31d84544e1a222a
tree47e8142c28ebf145bfef4666f1e8cd15a19402f5
parent093ccda1a041393c0588466a078e1f59837097cb
xhci: Fix port resume done detection for SS ports with LPM enabled

commit 6cbcf596934c8e16d6288c7cc62dfb7ad8eadf15 upstream.

A suspended SS port in U3 link state will go to U0 when resumed, but
can almost immediately after that enter U1 or U2 link power save
states before host controller driver reads the port status.

Host controller driver only checks for U0 state, and might miss
the finished resume, leaving flags unclear and skip notifying usb
code of the wake.

Add U1 and U2 to the possible link states when checking for finished
port resume.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c