Message ID | 27403844-e1be-a987-323d-584163e21d76@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On May 11, 2018 6:14 PM, Mathias Nyman <mathias.nyman@linux.intel.com> wrote: > > I think that just adding the below code should be enough for 4.17 > > diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c > > index 72ebbc9..32cd52c 100644 > > --- a/drivers/usb/host/xhci-hub.c > > +++ b/drivers/usb/host/xhci-hub.c > > @@ -354,7 +354,7 @@ int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, > > slot_id = 0; > > for (i = 0; i < MAX_HC_SLOTS; i++) { > > - if (!xhci->devs[i]) > > > > - if (!xhci->devs[i] || !xhci->devs[i]->udev) > > continue; > speed = xhci->devs[i]->udev->speed; > > if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3)) > > > > -Mathias I can confirm that above patch fixes this. I saw that offending commit was backported to 4.16.8 so it needs this fix as well. Thank you. Jordan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11.05.2018 23:06, Jordan Glover wrote: > On May 11, 2018 6:14 PM, Mathias Nyman <mathias.nyman@linux.intel.com> wrote: >> >> I think that just adding the below code should be enough for 4.17 >> >> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c >> >> index 72ebbc9..32cd52c 100644 >> >> --- a/drivers/usb/host/xhci-hub.c >> >> +++ b/drivers/usb/host/xhci-hub.c >> >> @@ -354,7 +354,7 @@ int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, >> >> slot_id = 0; >> >> for (i = 0; i < MAX_HC_SLOTS; i++) { >> >> - if (!xhci->devs[i]) >> >> >> >> - if (!xhci->devs[i] || !xhci->devs[i]->udev) >> >> continue; >> speed = xhci->devs[i]->udev->speed; >> >> if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3)) >> >> >> >> -Mathias > > I can confirm that above patch fixes this. I saw that offending commit was > backported to 4.16.8 so it needs this fix as well. Thank you. > Thanks, sent patch. Added stable tags and Reported-by/Tested-by: tags -Mathias -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 72ebbc9..32cd52c 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -354,7 +354,7 @@ int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, slot_id = 0; for (i = 0; i < MAX_HC_SLOTS; i++) { - if (!xhci->devs[i]) + if (!xhci->devs[i] || !xhci->devs[i]->udev) continue; speed = xhci->devs[i]->udev->speed; if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3))