Re: Drivers without suspend/resume/reset-resume support
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 11 Oct 2007, Oliver Neukum wrote: > > > > One way around the problem would be to unbind these bad drivers before > > > > the suspend begins, say in a notifier routine. That would leave a > > > > > > Problematic. You'd have to get the order of doing stuff exactly right. > > > > What order are you concerned about? It will be impossible to have > > Blocking new device additions vs. calling disconnect. If we disconnect the bad drivers after khubd has gone to sleep then no new devices will be added. There's still the possibility of userspace causing a bind via sysfs, though. > > Of course there's always the other approach -- solve the problem by > > adding suspend and resume methods to every driver! > > Are you volunteering? How many drivers are we talking about? > Resumption may involve IO, which therefore may fail. I cannot see the reason > to not count the lack of a resume method as a failure. We'll have to deal with > them anyway, especially for reset_resume. If a driver doesn't have a suspend or resume method, then resuming it can't involve I/O. :-) You appear to be saying that if a driver doesn't have a resume method, or the resume method returns an error, then the driver should be unbound as soon as possible. For non-system non-auto resumes this is right away, but for system resumes it isn't until the driver core is stable again. Likewise, non-system suspends should fail if a driver doesn't have a suspend method (I'm not so sure about this part). Does that sound right? Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel