Module Name:    src
Committed By:   jmcneill
Date:           Sat Aug 13 16:01:35 UTC 2022

Modified Files:
        src/sys/arch/arm/fdt: pcihost_fdt.c

Log Message:
Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/fdt/pcihost_fdt.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/arch/arm/fdt/pcihost_fdt.c
diff -u src/sys/arch/arm/fdt/pcihost_fdt.c:1.27 src/sys/arch/arm/fdt/pcihost_fdt.c:1.28
--- src/sys/arch/arm/fdt/pcihost_fdt.c:1.27	Mon Sep  6 14:03:17 2021
+++ src/sys/arch/arm/fdt/pcihost_fdt.c	Sat Aug 13 16:01:34 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pcihost_fdt.c,v 1.27 2021/09/06 14:03:17 jmcneill Exp $ */
+/* $NetBSD: pcihost_fdt.c,v 1.28 2022/08/13 16:01:34 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared D. McNeill <jmcne...@invisible.ca>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.27 2021/09/06 14:03:17 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.28 2022/08/13 16:01:34 jmcneill Exp $");
 
 #include <sys/param.h>
 
@@ -250,8 +250,6 @@ pcihost_config(struct pcihost_softc *sc)
 	const int chosen = OF_finddevice("/chosen");
 	if (chosen <= 0 || of_getprop_uint32(chosen, "linux,pci-probe-only", &probe_only))
 		probe_only = 0;
-	if (probe_only)
-		return 0;
 
 	if (sc->sc_pci_ranges != NULL) {
 		ranges = sc->sc_pci_ranges;
@@ -350,8 +348,12 @@ pcihost_config(struct pcihost_softc *sc)
 		}
 	}
 
-	error = pci_configure_bus(&sc->sc_pc, pcires, sc->sc_bus_min,
-	    PCIHOST_CACHELINE_SIZE);
+	if (probe_only) {
+		error = 0;
+	} else {
+		error = pci_configure_bus(&sc->sc_pc, pcires, sc->sc_bus_min,
+		    PCIHOST_CACHELINE_SIZE);
+	}
 
 	pciconf_resource_fini(pcires);
 

Reply via email to