Re: Drivers without suspend/resume/reset-resume support
Oliver Neukum <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Mittwoch 10 Oktober 2007 schrieb Alan Stern: > Oliver: > > We discussed earlier that if a driver doesn't have suspend/resume > support, it ought to be unbound when its device is suspended. > Likewise, if a driver doesn't have reset-resume support then it ought > to be unbound when a reset-resume occurs. > > It turns out this isn't as easy as it sounds. Upcoming changes to the > driver and PM cores will make it very dangerous to unbind drivers > during a system suspend: If the driver's disconnect method tries to > unregister a child device, it will deadlock. (Likewise, although it > doesn't matter for our purposes at the moment, if the driver tries to > register a child device, the registration will fail.) When exactly? Can we defer the unbinding to resume() ? From the viewpoint of the hardware we are OK if we disable the endpoints and nuke all URBs. > 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. > question about how to handle non-system suspends, such as when the user > does "echo suspend >/sys/.../power/level". But it's a nuisance any way > you look at it. IMHO these should fail if the drivers don't support it. > The reset-resume problem is even worse, since we don't know beforehand > when a reset-resume will be needed. As we don't know whether the reset_resume() call will return an error, this doesn't increase the difficulty. I'd prefer the defer the unbinding as much as possible, right before user space is woken. This way we can sanely handle errors in resumption. Regards Oliver ------------------------------------------------------------------------- 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