On Thu, 2004-10-28 at 11:22 -0700, Patrick Mochel wrote: > - Stop All Devices > > - Save Device State The 2 above are one and only one indivisible step. > - Start swap device back up > > - Stop swap device > > - Power down devices > - For ACPI S4, we actually want them to put devices in a low-power state > This is important to support this, since a) it's part of the spec, and > b) some wakeup events are available to this and not S5. The above requires a transition back to 0 (a resume), but resuming from the "freeze" state is very fast. > - For shutdown, this would be whatever the ->shutdown() method does. > > Point being there is a policy decision as to what we do on STD WRT power > state. We must provide for that. > > As far as methods go, we make our lives easier (in a way) by having a > totally separate method pair (start() and stop()), since it's the same > action no matter what. Plus, it's an easy hook to add and gives a nice > thing to test along the way (e.g. it would simple to only stop() all > devices and see if all the drivers get it right, without having to play > with power states and worry about crashing your system.) > > Does that make sense? > > > Most of the PITA that I'm seeing with USB should be easily > > resolved by only resuming the swap device (and ancestors), > > and that would simplify the suspend model for almost all > > drivers. (Except for swap devices, and ancestors, which > > would still need special attentions: appropriate.) > > I agree. > > > Pat -- Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>