On Thu, 14 Jun 2012, Richard Zhao wrote: > > > + if (unlikely(hcd->phy && !hdev->level)) { > > > > This is okay, but it's more common to test for root hubs with > > "!hdev->parent". > So it will be like: > if (unlikely(hcd->phy && !hdev->parent)) { Yes. > And, > I didn't check (portchange & USB_PORT_STAT_C_CONNECTION), because if > the device is connected on boot, there'll be no USB_PORT_STAT_C_CONNECTION. > Is it acceptable? Yes. In fact the hub_port_debounce() routine turns off USB_PORT_STAT_C_CONNECTION anyway. Alan Stern -- 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