On Tue, 15 May 2007, Oliver Neukum wrote: > Am Dienstag, 15. Mai 2007 20:40 schrieb Alan Stern: > > On Tue, 15 May 2007, Oliver Neukum wrote: > > > > Fourthly, some drivers cannot do it in principal, because they cannot > > > restore a device's state, eg. printer, scanner, ... > > > > 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 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. (Actually that's not quite true, because usbhid uses a set-idle request to prevent the device from sending updates when nothing has changed. The set-idle has to be repeated by the reset_resume method. But you know what I mean...) > I think you are mixing things that shouldn't be. Recovery from a loss > of power is different from getting reset for resume. In the latter case > identity is not in doubt. So then do you want to add _two_ new methods: one for reset_resume and the other for powerloss_resume? If we do, reset_resume will be used only for devices with the USB_QUIRK_RESET_RESUME flag set. > A driver that does not resume() but autosuspend is buggy. Plain and simple. > > > reset_resume() method. In such cases we could skip the rebinding. > > Indeed. But if we do that we must unbind. We can't have undead devices. 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. 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