summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/apm.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c
index 8cebfbce419..a2c1c070b5c 100644
--- a/sys/arch/i386/i386/apm.c
+++ b/sys/arch/i386/i386/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.41 2000/10/18 16:53:01 deraadt Exp $ */
+/* $OpenBSD: apm.c,v 1.42 2000/12/12 00:36:58 angelos Exp $ */
/*-
* Copyright (c) 1998-2000 Michael Shalayeff. All rights reserved.
@@ -858,6 +858,14 @@ apmattach(parent, self, aux)
lockinit(&sc->sc_lock, PWAIT, "apmlk", 0, 0);
+ /*
+ * Do a check once, ignoring any errors. This avoids
+ * gratuitous APM disconnects on laptops where the first
+ * event in the queue (after a boot) is non-recognizable.
+ * The IBM ThinkPad 770Z is one of those.
+ */
+ apm_periodic_check(sc);
+
if (apm_periodic_check(sc) == -1) {
apm_disconnect(sc);
apm_dobusy = apm_doidle = 0;