|
|
|
Re: [RFC PATCH V3 3/3] usb : Add sysfs files to control usb port's power | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
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-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Linux IBM ACPI] [Linux Power Management] [Linux Kernel] [Linux Laptop] [Kernel Newbies] [Share Photos] [Security] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite Photos] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Samba] [Video 4 Linux] [Device Mapper] [Linux Resources]
![]() |