Re: iBook G4 PmDisk
> > > Mine is a PowerBook5,5 model. I'll narrow down the list of modules
> > > interfering with suspend (I'm not happy to lose the USB mouse, for
> > > instance). There's another annoying feature of suspend - the system clock
> > Well, the mouse does work again after resume, does it?
>
> Sure. And unloading uhci_hcd is absolutely required for resume :-(
ohci_hcd is what I meant, of course. There's suspend support but that
seems broken.
> therm_adt746x won't stop on suspend, that's something that might be fixed,
> though.
The following patch fixes suspend with the thermostat driver loaded for
me. Please test on other hardware. A similar fix (adding the if
(current->flags & PF_FREEZE) refrigerator(PF_FREEZE);) should be
sufficient for the therm_windtunnel module. May require conditionalizing
on CONFIG_PM_DISK as far as the refrigerator call is concerned...
--- drivers/macintosh/therm_adt746x.c.org 2004-09-02 15:18:04.000000000 +0200
+++ drivers/macintosh/therm_adt746x.c 2004-09-02 16:22:46.893592704 +0200
@@ -228,6 +228,18 @@
th->last_speed[fan] = speed;
}
+void msleep_interruptible(unsigned int msecs)
+{
+ unsigned long timeout = msecs_to_jiffies(msecs);
+
+ while (timeout) {
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (current->flags & PF_FREEZE)
+ refrigerator(PF_FREEZE);
+ timeout = schedule_timeout(timeout);
+ }
+}
+
static int monitor_task(void *arg)
{
struct thermostat* th = arg;
@@ -246,7 +258,8 @@
while(monitor_running)
{
- msleep(2000);
+ /* msleep waits uninterruptibly! */
+ msleep_interruptible(2000);
/* Check status */
/* local : chip */
Hope I'm not missing something obvious,
Michael
Reply to: