Module Name: src Committed By: bouyer Date: Sat Sep 5 13:10:18 UTC 2009
Modified Files: src/sys/dev/acpi [netbsd-5-0]: 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 -r1.30.10.1 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 src/sys/dev/acpi/pckbc_acpi.c:1.30.10.1 --- src/sys/dev/acpi/pckbc_acpi.c:1.30 Tue Sep 16 11:24:55 2008 +++ src/sys/dev/acpi/pckbc_acpi.c Sat Sep 5 13:10:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pckbc_acpi.c,v 1.30 2008/09/16 11:24:55 pgoyette Exp $ */ +/* $NetBSD: pckbc_acpi.c,v 1.30.10.1 2009/09/05 13:10:18 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 2008/09/16 11:24:55 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.30.10.1 2009/09/05 13:10:18 bouyer Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -207,8 +207,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); @@ -229,9 +232,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); }