Re: Re: Hotplug events during sleep transition

Alan Stern
2005-12-29T02:13:14Z

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

On Tue, 27 Dec 2005, Patrick Mochel wrote:

> When the system is back up and userspace is started again, something
> should walk the device tree and reap the devices that are no longer
> present. The core could do this, so long as the flag was in struct device,
> though I'm not sure that it would know about the hooks to trigger a
> removal on the device's bus (or would it need to?). Then, we can free all
> the memory, do all the unregistering, and generate all the hotplug events.

Why do we need to do this? Why can't we rely on devices being
unregistered by the same mechanism that would operate in the absence of
any suspend/resume?

> Of course, at that point, we'll need to discover any new devices, which is
> going to be bus-speciifc. But, with a few extra bits of infrastructure
> (per-bus objects, and a ->scan() method in struct bus_type), this will
> relatively simple..

Again, why do we need anything special? What's wrong with the existing
method for discovering new hotplugged devices?

Alan Stern