Am Samstag, 10. Februar 2007 04:29 schrieb Alan Stern: > On Fri, 9 Feb 2007, Oliver Neukum wrote:
> > > + if (value > 0 && old == 0) > > > + usb_try_autosuspend_device(udev); > > > > You should retain symmetry. Writing 0 should wake up the device. > > The problem is that after the device is suspended, we don't know whether > it was an autosuspend or the result of an external user command. (It If that is true then we cannot know whether to wake up on demand. I am afraid that state will have to be recorded. > > Secondly, how about exposing USB_IF_DEVICE_BUSY through sysfs? > > It's constantly changing. The value exposed wouldn't be reliable. (Or > for devices where it's not constantly changing, the value is always 0 and > hence uninteresting.) Then interesting direction is writing, not reading. > > > + if (value) > > > + rc = usb_bus_type.suspend(dev, PMSG_SUSPEND); > > > > Thirdly, doesn't this have security implications? You can shut down > > network interfaces and swap spaces this way. > > Yes indeed -- just like many other sysfs interfaces, such as > bConfigurationValue. That also is capable of shutting down network > interfaces and swap spaces. True, but it means that the security implications are still different. You cannot rely on this interface to resume devices from user space. Therefore the delay interface should resume the device. Regards Oliver ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel