Am Dienstag, 15. Mai 2007 22:03 schrieb Alan Stern: > 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
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 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. Yes & yes. Specific methods are good. > > 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. 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. Regards Oliver ------------------------------------------------------------------------- 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