PowerMac: force only suspend-to-disk to be valid
Johannes Berg
johannes at sipsolutions.net
Thu May 25 20:05:27 EST 2006
On Tue, 2006-05-02 at 11:31 +0200, Johannes Berg wrote:
> This patch adds the .valid callback to pm_ops on PowerMac so that only the
> suspend to disk state can be entered. Note that just returning 0 would
> suffice since the upper layers don't pass PM_SUSPEND_DISK down, but I think
> they ought to be passing it down since they do really need support (or
> am I mistaken again?) so we handle it there regardless.
No one ever seemed to care about this patch, can we queue it up for
2.6.18? I suppose it's too late now for 2.6.17 even if it fixes the
long-standing but that on ppc, /sys/power/state kills the machine.
[quoted patch for reference]
> --- wireless-dev.orig/arch/powerpc/platforms/powermac/setup.c 2006-05-02 10:57:32.101509438 +0200
> +++ wireless-dev/arch/powerpc/platforms/powermac/setup.c 2006-05-02 10:58:44.491509438 +0200
> @@ -463,11 +463,23 @@ static int pmac_pm_finish(suspend_state_
> return 0;
> }
>
> +static int pmac_pm_valid(suspend_state_t state)
> +{
> + switch (state) {
> + case PM_SUSPEND_DISK:
> + return 1;
> + /* can't do any other states via generic mechanism yet */
> + default:
> + return 0;
> + }
> +}
> +
> static struct pm_ops pmac_pm_ops = {
> .pm_disk_mode = PM_DISK_SHUTDOWN,
> .prepare = pmac_pm_prepare,
> .enter = pmac_pm_enter,
> .finish = pmac_pm_finish,
> + .valid = pmac_pm_valid,
> };
>
> #endif /* CONFIG_SOFTWARE_SUSPEND */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 793 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060525/721278cb/attachment.pgp>
More information about the Linuxppc-dev
mailing list