Module Name:    src
Committed By:   bouyer
Date:           Sat Sep  5 13:10:03 UTC 2009

Modified Files:
        src/sys/dev/acpi [netbsd-5]: pckbc_acpi.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #939):
        sys/dev/acpi/pckbc_acpi.c: revision 1.32
PR# port-i386/39671: panic while booting with an acpi kernel on a 790GX board
If the firmware describes duplicate keyboard controller nodes, don't panic
when the driver fails to map registers.


To generate a diff of this commit:
cvs rdiff -u -r1.30.4.1 -r1.30.4.2 src/sys/dev/acpi/pckbc_acpi.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/pckbc_acpi.c
diff -u src/sys/dev/acpi/pckbc_acpi.c:1.30.4.1 src/sys/dev/acpi/pckbc_acpi.c:1.30.4.2
--- src/sys/dev/acpi/pckbc_acpi.c:1.30.4.1	Fri May  1 01:38:17 2009
+++ src/sys/dev/acpi/pckbc_acpi.c	Sat Sep  5 13:10:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pckbc_acpi.c,v 1.30.4.1 2009/05/01 01:38:17 snj Exp $	*/
+/*	$NetBSD: pckbc_acpi.c,v 1.30.4.2 2009/09/05 13:10:03 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.30.4.1 2009/05/01 01:38:17 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.30.4.2 2009/09/05 13:10:03 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -206,8 +206,11 @@
 			if (bus_space_map(aa->aa_iot, io0->ar_base,
 					  io0->ar_length, 0, &ioh_d) ||
 			    bus_space_map(aa->aa_iot, io1->ar_base,
-					  io1->ar_length, 0, &ioh_c))
-				panic("pckbc_acpi_attach: couldn't map");
+					  io1->ar_length, 0, &ioh_c)) {
+				aprint_error_dev(self,
+				    "unable to map registers\n");
+				goto out;
+			}
 
 			t = malloc(sizeof(struct pckbc_internal),
 			    M_DEVBUF, M_WAITOK|M_ZERO);
@@ -228,9 +231,11 @@
 
 		first->sc_pckbc.intr_establish = pckbc_acpi_intr_establish;
 		config_defer(first->sc_pckbc.sc_dv, pckbc_acpi_finish_attach);
-	} else if (!pmf_device_register(self, NULL, NULL))
+	}
+
+out:
+	if (!pmf_device_register(self, NULL, NULL))
 		aprint_error_dev(self, "couldn't establish power handler\n");
- out:
 	acpi_resource_cleanup(&res);
 }
 

Reply via email to