Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/acpi Only configure PCI bus if _DSM rev 1 func ...



details:   https://anonhg.NetBSD.org/src/rev/872cb54e8a6a
branches:  trunk
changeset: 836513:872cb54e8a6a
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Oct 21 11:05:24 2018 +0000

description:
Only configure PCI bus if _DSM rev 1 func 5 ("Ignore PCI boot configuration") returns 1

diffstat:

 sys/arch/arm/acpi/acpipchb.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r bc89c55cbd82 -r 872cb54e8a6a sys/arch/arm/acpi/acpipchb.c
--- a/sys/arch/arm/acpi/acpipchb.c      Sun Oct 21 11:04:26 2018 +0000
+++ b/sys/arch/arm/acpi/acpipchb.c      Sun Oct 21 11:05:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpipchb.c,v 1.2 2018/10/19 11:40:27 jmcneill Exp $ */
+/* $NetBSD: acpipchb.c,v 1.3 2018/10/21 11:05:24 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.2 2018/10/19 11:40:27 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.3 2018/10/21 11:05:24 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -52,6 +52,7 @@
 #include <dev/pci/pciconf.h>
 
 #include <dev/acpi/acpivar.h>
+#include <dev/acpi/acpi_pci.h>
 #include <dev/acpi/acpi_mcfg.h>
 
 #include <arm/acpi/acpi_pci_machdep.h>
@@ -132,9 +133,9 @@
        sc->sc_ap.ap_pc.pc_conf_v = &sc->sc_ap;
        sc->sc_ap.ap_seg = seg;
 
-       if (acpimcfg_configure_bus(self, &sc->sc_ap.ap_pc, sc->sc_handle, sc->sc_bus, PCIHOST_CACHELINE_SIZE) != 0) {
-               aprint_error_dev(self, "failed to configure PCI bus\n");
-               return;
+       if (acpi_pci_ignore_boot_config(sc->sc_handle)) {
+               if (acpimcfg_configure_bus(self, &sc->sc_ap.ap_pc, sc->sc_handle, sc->sc_bus, PCIHOST_CACHELINE_SIZE) != 0)
+                       aprint_error_dev(self, "failed to configure bus\n");
        }
 
        memset(&pba, 0, sizeof(pba));



Home | Main Index | Thread Index | Old Index