From ec0c94e7b9f27d94fcea0d1b4087ff9df614d037 Mon Sep 17 00:00:00 2001 From: Dana Myers Date: Mon, 9 Feb 2009 20:31:11 -0500 Subject: 6801832 pci_autoconfig:pci_enumerate ends in a bad mutex panic from ddi_prop_change during boot --- usr/src/uts/intel/io/pci/pci_boot.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'usr/src') diff --git a/usr/src/uts/intel/io/pci/pci_boot.c b/usr/src/uts/intel/io/pci/pci_boot.c index b158478722..5a0a9a32fb 100644 --- a/usr/src/uts/intel/io/pci/pci_boot.c +++ b/usr/src/uts/intel/io/pci/pci_boot.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2559,6 +2559,10 @@ add_ranges_prop(int bus, int ppb) int total, alloc_size; void *rp, *next_rp; + /* no devinfo node - unused bus, return */ + if (pci_bus_res[bus].dip == NULL) + return; + total = memlist_count(pci_bus_res[bus].io_ports); total += memlist_count(pci_bus_res[bus].mem_space); total += memlist_count(pci_bus_res[bus].pmem_space); @@ -2620,6 +2624,10 @@ add_bus_available_prop(int bus) int i, count; struct pci_phys_spec *sp; + /* no devinfo node - unused bus, return */ + if (pci_bus_res[bus].dip == NULL) + return; + count = memlist_count(pci_bus_res[bus].io_ports) + memlist_count(pci_bus_res[bus].mem_space) + memlist_count(pci_bus_res[bus].pmem_space); -- cgit v1.2.3