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:25:20 +0000 (06:25 +0200)
commit09fa576a74c2b6872a617b304e62acb1183e5254
tree4b3593d5d9ae383f545b7ea94c3cd01d72e4149c
parentdc4267dceaca44f938e7fbfb94d9445dfdeef996
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