xhci: fix finding correct bus_state structure for USB 3.1 hosts
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 18 Sep 2017 14:39:13 +0000 (17:39 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 1 Jan 2018 20:50:49 +0000 (20:50 +0000)
commit5e425d575cd83c9de5662378e78b90f2e39712dc
tree011aa8eb66102a82fdb139dfeccd340de179f1d1
parent0f87665439a5b128c3b76571e7bdaf061c9a2225
xhci: fix finding correct bus_state structure for USB 3.1 hosts

commit 5a838a13c9b4e5dd188b7a6eaeb894e9358ead0c upstream.

xhci driver keeps a bus_state structure for each hcd (usb2 and usb3)

The structure is picked based on hcd speed, but driver only compared
for HCD_USB3 speed, returning the wrong bus_state for HCD_USB31 hosts.

This caused null pointer dereference errors in bus_resume function.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/host/xhci.h