On Tue, 27 Dec 2005, Dmitry Torokhov wrote: > > Would it be possible to simply mark the device as 'removed' and ignore it > > until we resumed, and then clean it up (hotplug events and everything)? > > > > Unfortunately swsusp resumes devices in the middle of suspend process > with everything frozen and drivers don't know if they may clean up or > have to postpone doing so. Drivers should strive to avoid cleaning up after removed devices during their resume methods in any case. Such cleanups shouldn't happen until userspace has been unfrozen. > To do it uniformly you'd need to introduce > threads and offload cleanups. I doubt it is good idea to require each > subsystem to define cleanup thread or [ab]used keventd? Why do you need a new cleanup thread? What's wrong with the existing strategy for handling removed devices -- i.e., the procedure that would have been followed if there was no suspend/resume transition? Alan Stern