Manuel Bouyer wrote:
We had a similar issues some time ago, where disk would be spun down on reboot or halt without powerdown. My conclusion was that drivers needs to know what kind of suspend we're doing (suspend, reboot, halt, poweroff) to take appropriate action (which may not always be to power off the device). At this time, the disk issue was fixed by a hack using global variable. But I still believe drivers needs to get more informations from PMF to know what's going on.
Seconded. Options in my mind are: 1. Add another argument to pmf_device_register for a shutdown handler. 2. Pass "why" flags to suspend/resume callbacks.3. Get rid of pmf_device_register completely, and treat suspend/resume/shutdown as event handlers.
Any preferences? Cheers, Jared