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 Do not add PCI link references until the b...



details:   https://anonhg.NetBSD.org/src/rev/27e069bb9849
branches:  trunk
changeset: 836515:27e069bb9849
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Oct 21 11:56:26 2018 +0000

description:
Do not add PCI link references until the bus has been mapped

diffstat:

 sys/arch/arm/acpi/acpi_pci_machdep.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (46 lines):

diff -r d17571ac06e0 -r 27e069bb9849 sys/arch/arm/acpi/acpi_pci_machdep.c
--- a/sys/arch/arm/acpi/acpi_pci_machdep.c      Sun Oct 21 11:09:20 2018 +0000
+++ b/sys/arch/arm/acpi/acpi_pci_machdep.c      Sun Oct 21 11:56:26 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci_machdep.c,v 1.3 2018/10/21 00:42:05 jmcneill Exp $ */
+/* $NetBSD: acpi_pci_machdep.c,v 1.4 2018/10/21 11:56:26 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci_machdep.c,v 1.3 2018/10/21 00:42:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci_machdep.c,v 1.4 2018/10/21 11:56:26 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -187,13 +187,6 @@
                        handle = ad->ad_handle;
        }
 
-       if (ad != NULL) {
-               /*
-                * This is a new ACPI managed bus. Add PCI link references.
-                */
-               acpi_pci_md_pci_link(ad->ad_handle, pba->pba_bus);
-       }
-
        if (handle != NULL) {
                prt = kmem_alloc(sizeof(*prt), KM_SLEEP);
                prt->prt_bus = pba->pba_bus;
@@ -202,6 +195,13 @@
        }
 
        acpimcfg_map_bus(self, pba->pba_pc, pba->pba_bus);
+
+       if (ad != NULL) {
+               /*
+                * This is a new ACPI managed bus. Add PCI link references.
+                */
+               acpi_pci_md_pci_link(ad->ad_handle, pba->pba_bus);
+       }
 }
 
 static int



Home | Main Index | Thread Index | Old Index