On Thu, Feb 6, 2014 at 12:07 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > But come to think of it, you don't _really_ depend on the fact that the > USB-2 root hub is registered first. What matters is that the _primary_ > hcd is registered first. > >> + */ >> + if (!hdev->parent) { >> + struct usb_hub *peer_hub; >> + struct usb_device *peer_hdev; >> + struct usb_hcd *hcd = bus_to_hcd(hdev->bus); >> + struct usb_hcd *peer_hcd = hcd->primary_hcd; >> + >> + if (!hub_is_superspeed(hdev) >> + || WARN_ON_ONCE(!peer_hcd || hcd == peer_hcd)) > > So here, this could be changed to: > > if (!peer_hcd || hcd == peer_hcd) > That is nicer. The thought was to ensure that a usb3 port always had its peer established, but it turns out to not matter. I'll clean this up. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html