RE: Query regarding root hub reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 Dec 2014, Peter Chen wrote:

> > The Linux USB stack supports turning off port power only under a very limited
> > set of conditions.  For example, if the port is hard-wired or not connected at all,
> > and if remote wakeup is not required.
> > 
> 
> Alan, any reasons/limitations we do not support it (by libusb)?

For the same reason we don't allow userspace to interfere with any
device: When a kernel driver is in charge of a device, any changes the
user wants to make must go through the driver.  If users were allowed
to make changes to a device without telling the driver, then the driver
would not be able to do its job properly.

In fact, it's only a coincidence that Deepak's libusb call is able to
succeed.  Hub control messages use USB_RECIP_OTHER instead of
USB_RECIP_INTERFACE, even though they are always meant to go to the hub 
interface.  If the messages used USB_RECIP_INTERFACE then the kernel 
would prevent libusb from sending the message unless the user program 
first claimed the hub interface (which would mean unbinding the 
kernel's hub driver).

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux