Commit eea5d7ff authored by Mathias Nyman's avatar Mathias Nyman Committed by Thadeu Lima de Souza Cascardo

xhci: fix finding correct bus_state structure for USB 3.1 hosts

BugLink: http://bugs.launchpad.net/bugs/1724783

commit 5a838a13 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: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 9cffeb32
...@@ -1499,7 +1499,7 @@ struct xhci_bus_state { ...@@ -1499,7 +1499,7 @@ struct xhci_bus_state {
static inline unsigned int hcd_index(struct usb_hcd *hcd) static inline unsigned int hcd_index(struct usb_hcd *hcd)
{ {
if (hcd->speed == HCD_USB3) if (hcd->speed >= HCD_USB3)
return 0; return 0;
else else
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment