diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2017-09-18 17:39:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-12 09:18:02 +0200 |
commit | 9a7370be51a44373d4279a2566a9c988fe07aaf5 (patch) | |
tree | 7e8016d0a86950865f0e654be48dc2dd401bad0a | |
parent | 0502bf54bd01e8dbf4a057fe76f974074b5fb7e6 (diff) | |
download | linux-stable-9a7370be51a44373d4279a2566a9c988fe07aaf5.tar.gz linux-stable-9a7370be51a44373d4279a2566a9c988fe07aaf5.tar.bz2 linux-stable-9a7370be51a44373d4279a2566a9c988fe07aaf5.zip |
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>
-rw-r--r-- | drivers/usb/host/xhci.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 3850cb2af7a9..2ea272a3503c 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1434,7 +1434,7 @@ struct xhci_bus_state { static inline unsigned int hcd_index(struct usb_hcd *hcd) { - if (hcd->speed == HCD_USB3) + if (hcd->speed >= HCD_USB3) return 0; else return 1; |