Re: FYI: device_suspend(...) in kernel_power_off().

Pavel Machek
2005-08-10T13:08:03Z

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

Hi!

> >> > Code is not ready now => it can never be fixed? Thats quite a strange
> >> > conclusion to make.
> >>
> >> It seems there is an fundamental incompatibility with ACPI power off.
> >> As best as I can tell the normal case of device_suspend(PMSG_SUSPEND)
> >> works reasonably well in 2.6.x.
> >
> > Powerdown is going to have the same problems as the powerdown at the
> > end of suspend-to-disk. Can you ask people reporting broken shutdown
> > to try suspend-to-disk?
>
> Everyone I know of who is affected has been copied on this thread.
> However your request is just nonsense. There is a device_resume in
> the code before we get to the device_shutdown so there should be no
> effect at all. Are we looking at the same kernel?

Sorry, my fault. kernel/power/disk.c:power_down(): it calls
device_shutdown even in PM_DISK_PLATFORM case. I thought it would do
device_suspend() to enable drivers doing something more clever.

So only missing piece of puzzle seems to be making sure disks are
properly spinned down in device_shutdown... and even that seems to be
there, not sure why it was broken before.
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address