Module Name:    src
Committed By:   martin
Date:           Sat Jun 20 15:52:50 UTC 2020

Modified Files:
        src/sys/dev/acpi [netbsd-9]: acpi_ec.c

Log Message:
Pull up following revision(s) (requested by jdolecek in ticket #959):

        sys/dev/acpi/acpi_ec.c: revision 1.84

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


To generate a diff of this commit:
cvs rdiff -u -r1.75.20.3 -r1.75.20.4 src/sys/dev/acpi/acpi_ec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_ec.c
diff -u src/sys/dev/acpi/acpi_ec.c:1.75.20.3 src/sys/dev/acpi/acpi_ec.c:1.75.20.4
--- src/sys/dev/acpi/acpi_ec.c:1.75.20.3	Wed Apr 29 13:33:35 2020
+++ src/sys/dev/acpi/acpi_ec.c	Sat Jun 20 15:52:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_ec.c,v 1.75.20.3 2020/04/29 13:33:35 martin Exp $	*/
+/*	$NetBSD: acpi_ec.c,v 1.75.20.4 2020/06/20 15:52:50 martin Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <jo...@netbsd.org>.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.75.20.3 2020/04/29 13:33:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.75.20.4 2020/06/20 15:52:50 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/callout.h>
@@ -268,6 +268,11 @@ acpiec_attach(device_t parent, device_t 
 		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;

Reply via email to