Re: [PATCH] partial fix for Thinkpads and suspend

Garst R. Reese (reese@isn.net)
Wed, 09 Aug 2000 01:58:39 -0300


This is a multi-part message in MIME format.
--------------4B98E4868762C989E1796645
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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 \
--------------4B98E4868762C989E1796645
Content-Type: application/x-gzip;
name="apm.c.diff.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="apm.c.diff.gz"

H4sICKZgjDkCA2FwbS5jLmRpZmYAdVNdc9owEHw2v+KaJ4jBg8EkBRIGCiRNh0CGj/bRI8wZ
NMESkWRI2j/fk4DOMJn6wZa0d6vdlVypVIDtsiAJpOJrb8YM9PI1QAPCqFWNWrU61KrVasH3
/WPdRUmjVa+1wq/Hkm4XKvXb8g349L6FbrcAcA1juYew2WyW4ScqzaWAMAhDB/1gwnVeQDUH
PeDyM1Qv+ATZvT9Bke1ynd+5NlJ9tNyEnmpws2xBypU2sD81cAEyTXnC2RZeUQnclmHERf5O
VPUgunFWwiiyXsKoUW6ezZyfO5NtuhlbozCsspVrngSJzDrAxArufm+ZeZVdrl+lCDaqU4JM
rnjKcQXLD9CpCi64ppjJPUJ/Mn54eox7L8/xbDF7GY4H8bfJYtwfBgDzDcJS5iJB4GshFV4Q
cGFQ7ckK1yDkARIpUr7OFVtuMXCRgYvIpvAOA64tcOxS+c5oOGw4LRwQmELQud6hWJHYVCrI
WLLhAjWYDTOWyyMyhW85VxeSe6PR5Ff8NJ7PoPjIbNZTRI1wp+yHshCBQNMpFfx/B0VtVhYV
pqiQvLkjc9E3w5AukN8MG6d75Gmj8sTYGxjnGpV3zXS7AASs0cSGZxhTwmmx1C5UvGTL7cD3
rLDBJO6PnqjWI7dw7xg09ezkAVWsDTNYdJnPe/PhOfmSrVfIBT+Sq6Jb0ae97MzJrFWdzFp0
lslTKNp9vtzD8SD7/eFsViLEsxsTJFXx6hTxVRlo4cQsVjHu6To5MePJ9Lk3iqfD2eJ56Dxp
c/J0HFjnbznm+L+mMowXo5HjtsdYZJq82+TiLf0fbaA5abQ1bky56EpH4LspwR+nlqYnmfGB
cUMV1XbhL3YV1actBAAA
--------------4B98E4868762C989E1796645--

-
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/