Re: Re: Hotplug events during sleep transition

Dmitry Torokhov
2005-12-30T19:18:44Z

On Friday 30 December 2005 13:26, Alan Stern wrote:
> On Thu, 29 Dec 2005, Dmitry Torokhov wrote:
>
> > > 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?
> > >
> >
> > Sometimes there is no such procedure. For example if you yank PS/2 mouse
> > there is no way for the system to detect it's missing. Only when you try
> > to resume and mouse does not respond you realize it's gone. I bet there
> > are other devices like that.
>
> There may indeed be other devices like that.  If you can't handle device
> removal while the system is running normally, why should you be able to
> handle device removal while the system is suspended?
>

Because I can?

> Conversely, even if the resume routine does detect somehow that the device
> was removed, there's nothing it can do with that information if you don't
> have a mechanism in place for handling device removals.
>

The subsystem can handle device removal, its just hardware does not
give any notification when device is removed so subsystem has to rely
on some external event (such as resume process) to query the device
and check if it is still present.

--
Dmitry