On Fri, Jun 27, 2008 at 10:57:39PM +0200, Oliver Neukum wrote: > Am Freitag 27 Juni 2008 22:51:47 schrieben Sie: > > > > Ah, so it resumes the device even if it was not autosuspended but > > > > suspended for another reason? > > > > > > The other reason is either system wide, in which case nobody can call open, > > > or it is forcibly suspended via sysfs, causing usb_submit_urb() to fail later > > > on. > > > > Which will also fail the open() itself. Isn't that bad? That is, you can > > suspend an already open device without the users the device noticing > > but you can't open it if you happen to suspend it at just the right time. > > That doesn't strike me as good behaviour for a driver. > > Root can also unbind the driver. Sure, but in that case the behavior is consistent ie. the device disappears. > There is no behavior pleasing everybody. I would just prefer all drivers of the same subsystem to behave in a consistent manner. It would even make sense to document the desired behavior so future driver writers wouldn't have to come up with their own private rules for such things. As it stands the open can fail in seemingly random fashion which would be bad for the users. And my opinion (if it counts) is to allow the open to succeed for suspended devices since already opened devices would not notice the suspend either. I don't think there's any downside to handling this issue apart from adding a couple of lines of code. -- Ville Syrjälä syrjala@xxxxxx http://www.sci.fi/~syrjala/ -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html