Re: Re: [PATCH 1/23] Add missing device_suspsend(PMSG_FREEZE) calls.

david-b
2005-07-28T02:21:51Z

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

> And there is of course the puzzle of why there exists simultaneously
> driver shutdown() and suspend(PMSG_FREEZE) methods as I believed they
> are defined to do exactly the same thing.

No puzzle; that's not how they're defined. Both of them cause the
device to quiesce that device's activity. But:

- shutdown() is a "dirty shutdown OK" heads-up for some level
of restart/reboot; hardware will be completely re-initialized
later, normally with hardware level resets and OS rebooting.

- freeze() is a "clean shutdown only" that normally sees hardware
state preserved, and is followed by suspend() or resume().

Or so I had understood. That does suggest why having FREEZE in the
reboot path could be trouble: you could be rebooting because that
hardware won't do a clean shutdown!

- Dave