Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/acpi Explicitly re-enable the SCI interrupt whe...



details:   https://anonhg.NetBSD.org/src/rev/6d4a463628b3
branches:  trunk
changeset: 762149:6d4a463628b3
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Wed Feb 16 18:55:50 2011 +0000

description:
Explicitly re-enable the SCI interrupt when the wakeup starts (and before
interrupts are enabled). A workaround for a BIOS bug. Fixes the interrupt
storm reported by Taylor R. Campbell in PR # 44581.

diffstat:

 sys/arch/x86/acpi/acpi_wakeup.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 749685297150 -r 6d4a463628b3 sys/arch/x86/acpi/acpi_wakeup.c
--- a/sys/arch/x86/acpi/acpi_wakeup.c   Wed Feb 16 18:46:37 2011 +0000
+++ b/sys/arch/x86/acpi/acpi_wakeup.c   Wed Feb 16 18:55:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_wakeup.c,v 1.27 2011/01/13 03:45:38 jruoho Exp $  */
+/*     $NetBSD: acpi_wakeup.c,v 1.28 2011/02/16 18:55:50 jruoho Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.27 2011/01/13 03:45:38 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.28 2011/02/16 18:55:50 jruoho Exp $");
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe <takawata%jp.freebsd.org@localhost>
@@ -342,6 +342,13 @@
        inittodr(time_second);
 
        /*
+        * The BIOS should always re-enable the SCI upon
+        * resume from the S3 state. The following is a
+        * workaround for systems that fail to do this.
+        */
+       (void)AcpiWriteBitRegister(ACPI_BITREG_SCI_ENABLE, 1);
+
+       /*
         * Clear fixed events (see e.g. ACPI 3.0, p. 62).
         * Also prevent GPEs from misfiring by disabling
         * all GPEs before interrupts are enabled. The



Home | Main Index | Thread Index | Old Index