xhci: move usb2 speficic bits to own function in get_port_status call
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 7 Dec 2018 14:19:33 +0000 (16:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Dec 2018 14:40:41 +0000 (15:40 +0100)
commit70e9b53dfedced674d054166aae6e0366489eb86
tree6877e78d68594a3142e0de5c28bf780d8c5b1280
parent5f78a54f8d31e86aedd50f5b4d148dfeabafe88a
xhci: move usb2 speficic bits to own function in get_port_status call

Mostly refactoring, with the exception that USB_PORT_STAT_L1 link state
is reported if xhci port link is in U2 AND port is powered.

Previously we did not check if the port was powered, but according to
xhci spec 4.19.1.1.6 All the 'Enabled' states, including
USB_PORT_STAT_L1 (U2), U1, U0 and U3 must have Port power bit set.

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