On Mon, Apr 08, 2013 at 08:58:09PM +0800, Lan Tianyu wrote: > On 2013/3/30 4:24, Alan Stern wrote: > >On Fri, 29 Mar 2013, Sarah Sharp wrote: > > > >>>Also, bear in mind that the proposed patch does not give userspace a > >>>way to power off ports via usbfs. What the new code does is a > >>>power-off reset -- it turns off power to the port, waits a short time, > >>>and then turns power back on. > >> > >>I think we need two separate IOCTLs: turn off the port power and turn it > >>on. Then we get the manual port power off for our QA testing, distros > >>can make interesting policies about manually powering off ports, and > >>userspace can choose how long they want the port to be off. After all, > >>different devices may need a longer powered-off period than others. > > > >Or one port-power IOCTL that takes the setting as an argument. Yes, > >this would be more flexible than a power-off reset. > Hi Alan & Sarah: > I just recall why I put power off and power on in one ioctl. > At first, I also tried to make power on and power off into two ioctls. > But I found after powering off a device, the usbfs device node will > be removed and so can't power on the port via the same usbfs node. > > For this point, we should add usbfs node for usb port? No. -- 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