On Tue, 15 May 2007, Oliver Neukum wrote: > > > > Yes. Conversely, some drivers don't care about it at all because they > > > > don't maintain any state in the device. > > > > > > That I doubt. There's always the relationship with open files. Usually > > > eg. with mice you don't care because you use /dev/input/mice, but > > > if for any reason you use a specific mouse, you care. > > > > That relationship isn't stored in the device! Even if you use a > > The physical identity of the device determines it. > > > specific mouse, you don't care if the mouse gets reset -- the usbhid > > driver won't need to restore any of the mouse's state. > > But I do care about my device still being my device. A loss of power > does affect that.
I think we're getting off the point here. Suppose the usbhid driver gets a powerloss_resume call for a mouse. What do you want it to do that we aren't already doing? > > Not at all -- we should fix the driver! If it claims to support > > autosuspend then it should also be able to handle reset_resume without > > any need for rebinding. > > Why? Or rather which kind? Quirky devices are very rare. Why would > all drivers need to handle that? As for powerloss, a printer driver can > never do that, as it cannot restore the printer's setting. Likewise anything > claimed by usbfs. There are other examples. Two separate issues: reset_resume will happen only because of the quirk. But when it happens during an autoresume, we cannot unbind the driver because we don't own the device lock. So what do you want to do then? powerloss_resume will happen only when waking up from a system sleep, and since it won't be an autoresume we will own the device lock. Hence we will be able to rebind drivers. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel