Re: [PATCH] partial fix for Thinkpads and suspend

From: Garst R. Reese (reese@isn.net)
Date: Tue Aug 08 2000 - 23:58:39 EST


Stephen,
I sent the attached patch to apm linuxcare that you seem to think has
already been applied to the kernel. I don't think so. I never sent it to
Linus or the list, and have not seen it in any test6prex.
The problem I addressed was that there was a cli() instead of an
APM_DO_CLI
in int suspend(void);

I've been running with the patch I submitted to fix this problem for
some time.
Your solution to do an sti() in APM_DO_CLI seems quite ugly. I grant
that we do not want to do a cli before suspending, but I could not find
anybody else doing that, so just not doing is probably sufficient.
Garst

Stephen Rothwell wrote:
>
> Hi Linus,
>
> One of the recent changes to the power management code was to disable
> interrupts from just before suspending until after the drivers have
> been notified of the resume. This broke the Thinkpads. They do not
> completely resume anymore. It turns out that I have just been presented
> with a Thinkpad (for work), so I need to fix this :-)
>
> Please apply the enclosed patch. It is not quite completely correct,
> but at least the Thinkpads (which are the only laptops that require
> the CONFIG_APM_ALLOW_INTS option) will resume. The window we open
> is small, but it may be that we will still get interrupts for devices
> that need to be reinitialised first.
>
> A more complete solution is for each device to disable its interrupt
> before the suspend (I think).
>
> Cheers,
> Stephen
> --
> Stephen Rothwell, Open Source Project Engineer, Linuxcare, Inc.
> +61-2-62628990 tel, +61-2-62628991 fax
> sfr@linuxcare.com, http://www.linuxcare.com/
> Linuxcare. Support for the revolution.
>
> --- 2.4.0-test6pre9/arch/i386/kernel/apm.c Wed Aug 2 15:20:17 2000
> +++ fixed/arch/i386/kernel/apm.c Wed Aug 9 12:00:47 2000
> @@ -410,7 +410,7 @@
> #ifndef CONFIG_APM_ALLOW_INTS
> # define APM_DO_CLI __cli()
> #else
> -# define APM_DO_CLI
> +# define APM_DO_CLI __sti()
> #endif
> #ifdef APM_ZERO_SEGS
> # define APM_DECL_SEGS \


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:17 EST