On Thu, 7 Jun 2012, Lan Tianyu wrote: > > One more problem -- your implementation of "off" isn't quite right. > > You need to update hub_power_on() too. > > > How about this? > > --- a/drivers/usb/core/hub.c > +++ b/drivers/usb/core/hub.c > @@ -861,7 +861,9 @@ static unsigned hub_power_on(struct usb_hub *hub, bool do_delay) > dev_dbg(hub->intfdev, "trying to enable port power on " > "non-switchable hub\n"); > for (port1 = 1; port1 <= hub->descriptor->bNbrPorts; port1++) > - set_port_feature(hub->hdev, port1, USB_PORT_FEAT_POWER); > + if (hub->port_data[port1 - 1].port_power_policy > + == USB_PORT_POWER_ON) > + set_port_feature(hub->hdev, port1, USB_PORT_FEAT_POWER); Yes, that's the idea. 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