On Thu, 2005-06-02 at 17:52 +0200, Stelian Pop wrote: > Well, both issues seem to come from the same cause: post_freeze > (pmac_pm_post_freeze in arch/ppc/pmac_pm.c) is not called when resuming > from disk, only from mem. This has the effect that broadcast_wake() is > never called when resuming from disk, and this affects at least the > timer and the sound (and possibly other hardware, like serial etc).
Ah, good catch. That's more crap in the generic code where suspend-to-disk doesn't go through the "normal" process but instead bypasses everything and does it's own callback mecanism. Best is to fix the generic code here, broadcast_wake shouldn't be called while userland is still frozen. > The attached patch fixes this for me by moving the wakeup in the > finish() callback. Maybe making post_freeze to be called in the first > place would be a more correct fix... Yes. > The attached patch also fixes the kernel/power core to use PLATFORM > instead of SHUTDOWN as the sleep mode... Ok, good, I'll have a look, thanks. Ben. > Stelian. > Index: linux-2.6-trunk.git/arch/ppc/platforms/pmac_pm.c > =================================================================== > --- linux-2.6-trunk.git.orig/arch/ppc/platforms/pmac_pm.c 2005-06-02 > 10:23:17.000000000 +0200 > +++ linux-2.6-trunk.git/arch/ppc/platforms/pmac_pm.c 2005-06-02 > 17:27:58.000000000 +0200 > @@ -710,7 +710,7 @@ > > } else if (state == PM_SUSPEND_DISK) { > device_shutdown(); > - machine_restart(NULL); > + machine_power_off(); > } else > rc = -EINVAL; > return rc; > @@ -747,6 +747,9 @@ > { > DBG("%s(%d)\n", __FUNCTION__, state); > > + /* Broadcase old style wakeup */ > + broadcast_wake(); > + > /* Free PCI save block */ > pbook_free_pci_save(); > > @@ -755,9 +758,6 @@ > static void __pmac pmac_pm_post_freeze(suspend_state_t state) > { > DBG("%s(%d)\n", __FUNCTION__, state); > - > - /* Broadcase old style wakeup */ > - broadcast_wake(); > } > > static struct pm_ops pmac_pm_ops __pmacdata = { > Index: linux-2.6-trunk.git/kernel/power/main.c > =================================================================== > --- linux-2.6-trunk.git.orig/kernel/power/main.c 2005-06-02 > 10:23:17.000000000 +0200 > +++ linux-2.6-trunk.git/kernel/power/main.c 2005-06-02 > 17:17:04.000000000 +0200 > @@ -34,6 +34,7 @@ > { > down(&pm_sem); > pm_ops = ops; > + pm_disk_mode = pm_ops->pm_disk_mode; > up(&pm_sem); > } > > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]