Re: Re: Hotplug events during sleep transition

Alan Stern
2006-01-05T16:07:52Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1218 bytes --]

On Thu, 5 Jan 2006, Pavel Machek wrote:

> On St 28-12-05 21:18:38, Alan Stern wrote:
> > On Wed, 28 Dec 2005, Rafael J. Wysocki wrote:
> >
> > > I think for a (suspended) device that can be removed, unplugged, undocked,
> > > etc. (call it "removable") the most natural place in which we can detect
> > > that the device is no longer accessible is the device driver's .resume()
> > > routine, at least as far as swsusp is concerned.
> >
> > No. The most natural place in which we can detect that a device is no
> > longer accessible is the place where we already do these detections. Not
> > in the resume routine.
>
> ...for reasonable buses, like usb. For something like ps/2, .resume is
> the place to check, I'm afraid.

It's _a_ place to check. On the other hand, since there's no checking
anywhere else, why does there need to be a check in .resume?

If people insist on detecting device removal during resume, then the
driver and PM cores will have to be able to cope with it. Dumping
everything into keventd's lap is one approach. Or we could define a list
of devices awaiting unregistration; the list could be scanned every time a
system resume or runtime resume procedure completes.

Alan Stern