[Patch v5 03/13] USB: notify phy when root hub port connect change

Alan Stern stern at rowland.harvard.edu
Thu Jun 14 10:11:00 EDT 2012


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






More information about the linux-arm-kernel mailing list