Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi only install space handler and enable interrupt...



details:   https://anonhg.NetBSD.org/src/rev/13867293735e
branches:  trunk
changeset: 973005:13867293735e
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Jun 15 15:29:46 2020 +0000

description:
only install space handler and enable interrupt for EC if ACPI
claims the device is actually present, it's not enough when there
is entry for it in the ACPI tables

fixes interrupt storm triggered on Dell PowerEdge R220 by enabling
GPE interrupt on a non-enabled EC (for which _REG call later
fails), reported and fix tested by Dima Veselov:
http://mail-index.netbsd.org/netbsd-users/2020/03/02/msg024166.html

XXX pullup netbsd-9

diffstat:

 sys/dev/acpi/acpi_ec.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 25c39bc4f642 -r 13867293735e sys/dev/acpi/acpi_ec.c
--- a/sys/dev/acpi/acpi_ec.c    Mon Jun 15 14:46:28 2020 +0000
+++ b/sys/dev/acpi/acpi_ec.c    Mon Jun 15 15:29:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_ec.c,v 1.83 2020/05/04 20:06:38 jdolecek Exp $    */
+/*     $NetBSD: acpi_ec.c,v 1.84 2020/06/15 15:29:46 jdolecek Exp $    */
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.83 2020/05/04 20:06:38 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.84 2020/06/15 15:29:46 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/callout.h>
@@ -268,6 +268,11 @@
                goto fail0;
        }
 
+       if (!acpi_device_present(aa->aa_node->ad_handle)) {
+               aprint_normal(": not present\n");
+               goto fail0;
+       }
+
        if (!acpiec_parse_gpe_package(self, aa->aa_node->ad_handle,
                                      &gpe_handle, &gpebit))
                goto fail0;



Home | Main Index | Thread Index | Old Index