git: 723da5d92f40 - main - Replace calls to bus_generic_probe with bus_identify_children

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 06 Dec 2024 22:29:16 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=723da5d92f40a413585107f8455280ea575fe410

commit 723da5d92f40a413585107f8455280ea575fe410
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-12-06 22:26:05 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-12-06 22:26:05 +0000

    Replace calls to bus_generic_probe with bus_identify_children
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D47674
---
 sys/amd64/acpica/acpi_machdep.c                    | 2 +-
 sys/arm/arm/gic_acpi.c                             | 2 +-
 sys/arm/arm/gic_fdt.c                              | 2 +-
 sys/arm/arm/nexus.c                                | 2 +-
 sys/arm/broadcom/bcm2835/bcm2835_sdhci.c           | 2 +-
 sys/arm/broadcom/bcm2835/bcm2835_sdhost.c          | 2 +-
 sys/arm/nvidia/tegra_sdhci.c                       | 2 +-
 sys/arm/ti/am335x/am335x_ehrpwm.c                  | 2 +-
 sys/arm/ti/am335x/am335x_pwmss.c                   | 2 +-
 sys/arm/ti/cpsw/if_cpsw.c                          | 2 +-
 sys/arm/ti/ti_omap4_cm.c                           | 2 +-
 sys/arm/ti/ti_prcm.c                               | 2 +-
 sys/arm/ti/ti_scm_syscon.c                         | 2 +-
 sys/arm/ti/ti_sdhci.c                              | 2 +-
 sys/arm/ti/usb/omap_host.c                         | 2 +-
 sys/arm64/arm64/nexus.c                            | 2 +-
 sys/arm64/rockchip/rk_pinctrl.c                    | 2 +-
 sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c | 2 +-
 sys/dev/acpi_support/acpi_wmi.c                    | 2 +-
 sys/dev/acpica/acpi.c                              | 2 +-
 sys/dev/acpica/acpi_container.c                    | 2 +-
 sys/dev/acpica/acpi_cpu.c                          | 2 +-
 sys/dev/acpica/acpi_pcib_acpi.c                    | 2 +-
 sys/dev/atkbdc/atkbdc_isa.c                        | 2 +-
 sys/dev/cxgbe/t4_main.c                            | 6 +-----
 sys/dev/dpaa2/dpaa2_mc.c                           | 2 +-
 sys/dev/dpaa2/dpaa2_mc_fdt.c                       | 5 +++--
 sys/dev/dpaa2/dpaa2_rc.c                           | 8 ++++----
 sys/dev/dpaa2/memac_mdio_acpi.c                    | 2 +-
 sys/dev/dpaa2/memac_mdio_fdt.c                     | 2 +-
 sys/dev/etherswitch/ar40xx/ar40xx_main.c           | 2 +-
 sys/dev/etherswitch/arswitch/arswitch.c            | 2 +-
 sys/dev/etherswitch/e6000sw/e6000sw.c              | 2 +-
 sys/dev/etherswitch/e6000sw/e6060sw.c              | 2 +-
 sys/dev/etherswitch/felix/felix.c                  | 2 +-
 sys/dev/etherswitch/infineon/adm6996fc.c           | 2 +-
 sys/dev/etherswitch/ip17x/ip17x.c                  | 2 +-
 sys/dev/etherswitch/micrel/ksz8995ma.c             | 2 +-
 sys/dev/etherswitch/mtkswitch/mtkswitch.c          | 2 +-
 sys/dev/etherswitch/rtl8366/rtl8366rb.c            | 2 +-
 sys/dev/etherswitch/ukswitch/ukswitch.c            | 2 +-
 sys/dev/firewire/firewire.c                        | 2 +-
 sys/dev/firewire/fwohci_pci.c                      | 2 +-
 sys/dev/firmware/arm/scmi.c                        | 2 +-
 sys/dev/gpio/dwgpio/dwgpio_bus.c                   | 2 +-
 sys/dev/gpio/gpiobus.c                             | 2 +-
 sys/dev/gpio/ofw_gpiobus.c                         | 2 +-
 sys/dev/hid/hidbus.c                               | 2 +-
 sys/dev/hyperv/vmbus/vmbus.c                       | 2 +-
 sys/dev/iicbus/iicbus.c                            | 2 +-
 sys/dev/iicbus/ofw_iicbus.c                        | 2 +-
 sys/dev/mdio/mdio.c                                | 2 +-
 sys/dev/ofw/ofw_cpu.c                              | 2 +-
 sys/dev/ofw/ofwbus.c                               | 2 +-
 sys/dev/pci/hostb_pci.c                            | 2 +-
 sys/dev/pci/isa_pci.c                              | 2 +-
 sys/dev/pci/vga_pci.c                              | 2 +-
 sys/dev/ppbus/ppbconf.c                            | 2 +-
 sys/dev/pwm/ofw_pwmbus.c                           | 2 +-
 sys/dev/pwm/pwmbus.c                               | 2 +-
 sys/dev/sdhci/fsl_sdhci.c                          | 2 +-
 sys/dev/smbus/smbus.c                              | 2 +-
 sys/dev/spibus/ofw_spibus.c                        | 2 +-
 sys/dev/sram/mmio_sram.c                           | 2 +-
 sys/dev/superio/superio.c                          | 2 +-
 sys/dev/xen/bus/xenpv.c                            | 4 +---
 sys/dev/xen/xenstore/xenstore.c                    | 4 ++--
 sys/i386/acpica/acpi_machdep.c                     | 2 +-
 sys/isa/isa_common.c                               | 2 +-
 sys/isa/vga_isa.c                                  | 2 +-
 sys/powerpc/mambo/mambo.c                          | 2 +-
 sys/powerpc/powerpc/nexus.c                        | 2 +-
 sys/riscv/riscv/nexus.c                            | 2 +-
 sys/x86/x86/legacy.c                               | 4 ++--
 sys/x86/x86/nexus.c                                | 2 +-
 75 files changed, 82 insertions(+), 87 deletions(-)

diff --git a/sys/amd64/acpica/acpi_machdep.c b/sys/amd64/acpica/acpi_machdep.c
index 081fe89537bb..67e71cb2de55 100644
--- a/sys/amd64/acpica/acpi_machdep.c
+++ b/sys/amd64/acpica/acpi_machdep.c
@@ -267,7 +267,7 @@ nexus_acpi_attach(device_t dev)
 {
 
 	nexus_init_resources();
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	if (BUS_ADD_CHILD(dev, 10, "acpi", 0) == NULL)
 		panic("failed to add acpi0 device");
 
diff --git a/sys/arm/arm/gic_acpi.c b/sys/arm/arm/gic_acpi.c
index 6fd6f5271375..f30f51e1a1b7 100644
--- a/sys/arm/arm/gic_acpi.c
+++ b/sys/arm/arm/gic_acpi.c
@@ -242,7 +242,7 @@ gic_acpi_attach(device_t dev)
 
 	/* If we have children probe and attach them */
 	if (arm_gic_add_children(dev)) {
-		bus_generic_probe(dev);
+		bus_identify_children(dev);
 		return (bus_generic_attach(dev));
 	}
 
diff --git a/sys/arm/arm/gic_fdt.c b/sys/arm/arm/gic_fdt.c
index 06a869eaae42..6c5b5be43175 100644
--- a/sys/arm/arm/gic_fdt.c
+++ b/sys/arm/arm/gic_fdt.c
@@ -185,7 +185,7 @@ gic_fdt_attach(device_t dev)
 
 	/* If we have children probe and attach them */
 	if (arm_gic_add_children(dev)) {
-		bus_generic_probe(dev);
+		bus_identify_children(dev);
 		return (bus_generic_attach(dev));
 	}
 
diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c
index 8274a792839d..06f599652698 100644
--- a/sys/arm/arm/nexus.c
+++ b/sys/arm/arm/nexus.c
@@ -184,7 +184,7 @@ nexus_attach(device_t dev)
 	/*
 	 * Next, deal with the children we know about already.
 	 */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	return (0);
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
index b9f788b2af9b..5ff7b5069c6b 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
@@ -353,7 +353,7 @@ bcm_sdhci_attach(device_t dev)
 	sc->sc_sdhci_buffer_phys = rman_get_start(sc->sc_mem_res) +
 	    SDHCI_BUFFER;
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	sdhci_start_slot(&sc->sc_slot);
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c
index 232948fbb17f..29f062d6ab2b 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c
@@ -472,7 +472,7 @@ bcm_sdhost_attach(device_t dev)
 
 	sdhci_init_slot(dev, &sc->sc_slot, 0);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	sdhci_start_slot(&sc->sc_slot);
diff --git a/sys/arm/nvidia/tegra_sdhci.c b/sys/arm/nvidia/tegra_sdhci.c
index 2b152227d95f..d37f71a150a2 100644
--- a/sys/arm/nvidia/tegra_sdhci.c
+++ b/sys/arm/nvidia/tegra_sdhci.c
@@ -386,7 +386,7 @@ tegra_sdhci_attach(device_t dev)
 
 	sc->gpio = sdhci_fdt_gpio_setup(sc->dev, &sc->slot);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	sdhci_start_slot(&sc->slot);
diff --git a/sys/arm/ti/am335x/am335x_ehrpwm.c b/sys/arm/ti/am335x/am335x_ehrpwm.c
index 2296b050517f..77b6384b17a7 100644
--- a/sys/arm/ti/am335x/am335x_ehrpwm.c
+++ b/sys/arm/ti/am335x/am335x_ehrpwm.c
@@ -517,7 +517,7 @@ am335x_ehrpwm_attach(device_t dev)
 		// This driver can still do things even without the bus child.
 	}
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	return (bus_generic_attach(dev));
 fail:
 	PWM_LOCK_DESTROY(sc);
diff --git a/sys/arm/ti/am335x/am335x_pwmss.c b/sys/arm/ti/am335x/am335x_pwmss.c
index 8766c706b807..9d584910ee58 100644
--- a/sys/arm/ti/am335x/am335x_pwmss.c
+++ b/sys/arm/ti/am335x/am335x_pwmss.c
@@ -150,7 +150,7 @@ am335x_pwmss_attach(device_t dev)
 	/*
 	 * Allow devices to identify.
 	 */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/*
 	 * Now walk the OFW tree and attach top-level devices.
diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c
index 8012f8441e76..7756940bb28d 100644
--- a/sys/arm/ti/cpsw/if_cpsw.c
+++ b/sys/arm/ti/cpsw/if_cpsw.c
@@ -911,7 +911,7 @@ cpsw_attach(device_t dev)
 			return (ENXIO);
 		}
 	}
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	return (0);
diff --git a/sys/arm/ti/ti_omap4_cm.c b/sys/arm/ti/ti_omap4_cm.c
index b558d6262158..67c17ec4df98 100644
--- a/sys/arm/ti/ti_omap4_cm.c
+++ b/sys/arm/ti/ti_omap4_cm.c
@@ -107,7 +107,7 @@ ti_omap4_cm_attach(device_t dev)
 		return (ENXIO);
 	}
 
-	bus_generic_probe(sc->dev);
+	bus_identify_children(sc->dev);
 
 	for (child = OF_child(node); child > 0; child = OF_peer(child)) {
 		cdev = simplebus_add_device(dev, child, 0, NULL, -1, NULL);
diff --git a/sys/arm/ti/ti_prcm.c b/sys/arm/ti/ti_prcm.c
index 0006d0eaec9b..7afb9a2a5678 100644
--- a/sys/arm/ti/ti_prcm.c
+++ b/sys/arm/ti/ti_prcm.c
@@ -188,7 +188,7 @@ ti_prcm_attach(device_t dev)
 #endif
 	}
 
-	bus_generic_probe(sc->dev);
+	bus_identify_children(sc->dev);
 	for (child = OF_child(node); child != 0; child = OF_peer(child)) {
 		simplebus_add_device(dev, child, 0, NULL, -1, NULL);
 	}
diff --git a/sys/arm/ti/ti_scm_syscon.c b/sys/arm/ti/ti_scm_syscon.c
index 7286be7b8f2c..729af03c4abd 100644
--- a/sys/arm/ti/ti_scm_syscon.c
+++ b/sys/arm/ti/ti_scm_syscon.c
@@ -185,7 +185,7 @@ ti_scm_syscon_attach(device_t dev)
 
 	simplebus_init(sc->dev, node);
 
-	bus_generic_probe(sc->dev);
+	bus_identify_children(sc->dev);
 	for (child = OF_child(node); child != 0; child = OF_peer(child)) {
 		simplebus_add_device(sc->dev, child, 0, NULL, -1, NULL);
 	}
diff --git a/sys/arm/ti/ti_sdhci.c b/sys/arm/ti/ti_sdhci.c
index 29035fee77c9..597d2a35fba6 100644
--- a/sys/arm/ti/ti_sdhci.c
+++ b/sys/arm/ti/ti_sdhci.c
@@ -687,7 +687,7 @@ ti_sdhci_attach(device_t dev)
 	if (OF_hasprop(node, "non-removable"))
 		sc->force_card_present = true;
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	sdhci_start_slot(&sc->slot);
diff --git a/sys/arm/ti/usb/omap_host.c b/sys/arm/ti/usb/omap_host.c
index 631c74e19686..2e4677a2a488 100644
--- a/sys/arm/ti/usb/omap_host.c
+++ b/sys/arm/ti/usb/omap_host.c
@@ -413,7 +413,7 @@ omap_uhh_attach(device_t dev)
 	/*
 	 * Allow devices to identify.
 	 */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/*
 	 * Now walk the OFW tree and attach top-level devices.
diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c
index d780c9950e63..8628e29bd94c 100644
--- a/sys/arm64/arm64/nexus.c
+++ b/sys/arm64/arm64/nexus.c
@@ -177,7 +177,7 @@ nexus_attach(device_t dev)
 	if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0))
 		panic("nexus_attach irq_rman");
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	return (0);
diff --git a/sys/arm64/rockchip/rk_pinctrl.c b/sys/arm64/rockchip/rk_pinctrl.c
index 4cf266df3cbf..f77e7965a549 100644
--- a/sys/arm64/rockchip/rk_pinctrl.c
+++ b/sys/arm64/rockchip/rk_pinctrl.c
@@ -1511,7 +1511,7 @@ rk_pinctrl_attach(device_t dev)
 
 	simplebus_init(dev, node);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/* Attach child devices */
 	for (node = OF_child(node), gpio_unit = 0; node > 0;
diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c
index 5b47377735f1..1a1f18d825bf 100644
--- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c
+++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c
@@ -192,7 +192,7 @@ bcm_vchiq_attach(device_t dev)
 
 	vchiq_init();
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	return (0);
diff --git a/sys/dev/acpi_support/acpi_wmi.c b/sys/dev/acpi_support/acpi_wmi.c
index 6601db4317cb..d4b90ad9a508 100644
--- a/sys/dev/acpi_support/acpi_wmi.c
+++ b/sys/dev/acpi_support/acpi_wmi.c
@@ -296,7 +296,7 @@ acpi_wmi_attach(device_t dev)
 	}
 		
 	if (ret == 0) {
-		bus_generic_probe(dev);
+		bus_identify_children(dev);
 		ret = bus_generic_attach(dev);
 	}
 
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index a7ff4e302bed..a16719dd0941 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -2279,7 +2279,7 @@ acpi_probe_children(device_t bus)
 
     /* Create any static children by calling device identify methods. */
     ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "device identify routines\n"));
-    bus_generic_probe(bus);
+    bus_identify_children(bus);
 
     /* Probe/attach all children, created statically and from the namespace. */
     ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "acpi bus_generic_attach\n"));
diff --git a/sys/dev/acpica/acpi_container.c b/sys/dev/acpica/acpi_container.c
index 81a1ee8ce25c..ec4150ab186f 100644
--- a/sys/dev/acpica/acpi_container.c
+++ b/sys/dev/acpica/acpi_container.c
@@ -103,7 +103,7 @@ static int
 acpi_syscont_attach(device_t dev)
 {
 
-    bus_generic_probe(dev);
+    bus_identify_children(dev);
     return (bus_generic_attach(dev));
 }
 
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index 63e17de1ff28..58be4b228507 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -467,7 +467,7 @@ acpi_cpu_postattach(void *unused __unused)
     bus_topo_lock();
     CPU_FOREACH(i) {
 	if ((sc = cpu_softc[i]) != NULL)
-		bus_generic_probe(sc->cpu_dev);
+		bus_identify_children(sc->cpu_dev);
     }
     CPU_FOREACH(i) {
 	if ((sc = cpu_softc[i]) != NULL) {
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index ff211102cc3c..a268181ff2d6 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -528,7 +528,7 @@ acpi_pcib_acpi_attach(device_t dev)
     /* Don't fail to attach if the domain can't be queried or set. */
     error = 0;
 
-    bus_generic_probe(dev);
+    bus_identify_children(dev);
     if (device_add_child(dev, "pci", -1) == NULL) {
 	bus_dma_tag_destroy(sc->ap_dma_tag);
 	sc->ap_dma_tag = NULL;
diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c
index 2f7b9eceda94..f73589cdf2a2 100644
--- a/sys/dev/atkbdc/atkbdc_isa.c
+++ b/sys/dev/atkbdc/atkbdc_isa.c
@@ -238,7 +238,7 @@ atkbdc_isa_attach(device_t dev)
 	}
 	*(atkbdc_softc_t **)device_get_softc(dev) = sc;
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	return 0;
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index a7dd532cc077..2030b287a496 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -1624,11 +1624,7 @@ t4_attach(device_t dev)
 		goto done;
 	}
 
-	rc = bus_generic_probe(dev);
-	if (rc != 0) {
-		device_printf(dev, "failed to probe child drivers: %d\n", rc);
-		goto done;
-	}
+	bus_identify_children(dev);
 
 	/*
 	 * Ensure thread-safe mailbox access (in debug builds).
diff --git a/sys/dev/dpaa2/dpaa2_mc.c b/sys/dev/dpaa2/dpaa2_mc.c
index c7553e8a514a..738a1db8b7e1 100644
--- a/sys/dev/dpaa2/dpaa2_mc.c
+++ b/sys/dev/dpaa2/dpaa2_mc.c
@@ -268,7 +268,7 @@ dpaa2_mc_attach(device_t dev)
 		dpaa2_mc_detach(dev);
 		return (ENXIO);
 	}
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	return (0);
diff --git a/sys/dev/dpaa2/dpaa2_mc_fdt.c b/sys/dev/dpaa2/dpaa2_mc_fdt.c
index a6babfc89ca9..a571f4cf7219 100644
--- a/sys/dev/dpaa2/dpaa2_mc_fdt.c
+++ b/sys/dev/dpaa2/dpaa2_mc_fdt.c
@@ -253,11 +253,12 @@ dpaa2_mc_fdt_attach(device_t dev)
 	sc->acpi_based = false;
 	sc->ofw_node = ofw_bus_get_node(dev);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
+
 	/*
 	 * Attach the children represented in the device tree.
 	 */
diff --git a/sys/dev/dpaa2/dpaa2_rc.c b/sys/dev/dpaa2/dpaa2_rc.c
index 49ed8944b64b..221af43f2bf7 100644
--- a/sys/dev/dpaa2/dpaa2_rc.c
+++ b/sys/dev/dpaa2/dpaa2_rc.c
@@ -2826,7 +2826,7 @@ dpaa2_rc_discover(struct dpaa2_rc_softc *sc)
 		dpaa2_rc_add_managed_child(sc, &cmd, &obj);
 	}
 	/* Probe and attach MC portals. */
-	bus_generic_probe(rcdev);
+	bus_identify_children(rcdev);
 	rc = bus_generic_attach(rcdev);
 	if (rc) {
 		DPAA2_CMD_RC_CLOSE(rcdev, child, &cmd);
@@ -2854,7 +2854,7 @@ dpaa2_rc_discover(struct dpaa2_rc_softc *sc)
 		dpaa2_rc_add_managed_child(sc, &cmd, &obj);
 	}
 	/* Probe and attach managed devices properly. */
-	bus_generic_probe(rcdev);
+	bus_identify_children(rcdev);
 	rc = bus_generic_attach(rcdev);
 	if (rc) {
 		DPAA2_CMD_RC_CLOSE(rcdev, child, &cmd);
@@ -2879,7 +2879,7 @@ dpaa2_rc_discover(struct dpaa2_rc_softc *sc)
 	DPAA2_CMD_RC_CLOSE(rcdev, child, &cmd);
 
 	/* Probe and attach the rest of devices. */
-	bus_generic_probe(rcdev);
+	bus_identify_children(rcdev);
 	return (bus_generic_attach(rcdev));
 }
 
@@ -2986,7 +2986,7 @@ dpaa2_rc_add_child(struct dpaa2_rc_softc *sc, struct dpaa2_cmd *cmd,
  * function is supposed to discover such managed objects in the resource
  * container and add them as children to perform a proper initialization.
  *
- * NOTE: It must be called together with bus_generic_probe() and
+ * NOTE: It must be called together with bus_identify_children() and
  *       bus_generic_attach() before dpaa2_rc_add_child().
  */
 static int
diff --git a/sys/dev/dpaa2/memac_mdio_acpi.c b/sys/dev/dpaa2/memac_mdio_acpi.c
index 8040b636d06b..a3e88303b1d9 100644
--- a/sys/dev/dpaa2/memac_mdio_acpi.c
+++ b/sys/dev/dpaa2/memac_mdio_acpi.c
@@ -262,7 +262,7 @@ memac_mdio_acpi_attach(device_t dev)
 	ACPI_SCAN_CHILDREN(device_get_parent(dev), dev, 1,
 	    memac_mdio_acpi_probe_child, &ctx);
 	if (ctx.countok > 0) {
-		bus_generic_probe(dev);
+		bus_identify_children(dev);
 		bus_generic_attach(dev);
 	}
 
diff --git a/sys/dev/dpaa2/memac_mdio_fdt.c b/sys/dev/dpaa2/memac_mdio_fdt.c
index 18643522ed8a..247a70c6545c 100644
--- a/sys/dev/dpaa2/memac_mdio_fdt.c
+++ b/sys/dev/dpaa2/memac_mdio_fdt.c
@@ -238,7 +238,7 @@ memac_mdio_fdt_attach(device_t dev)
 		return (error);
 
 	/* Attach the *phy* children represented in the device tree. */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	node = ofw_bus_get_node(dev);
 	simplebus_init(dev, node);
diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_main.c b/sys/dev/etherswitch/ar40xx/ar40xx_main.c
index 757dbe23071e..979d5bb39444 100644
--- a/sys/dev/etherswitch/ar40xx/ar40xx_main.c
+++ b/sys/dev/etherswitch/ar40xx/ar40xx_main.c
@@ -482,7 +482,7 @@ ar40xx_attach(device_t dev)
 	/* Attach PHYs */
 	ret = ar40xx_attach_phys(sc);
 
-	ret = bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	ret = bus_generic_attach(dev);
 
diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c
index f1e6d1944038..395edf3322ae 100644
--- a/sys/dev/etherswitch/arswitch/arswitch.c
+++ b/sys/dev/etherswitch/arswitch/arswitch.c
@@ -649,7 +649,7 @@ arswitch_attach(device_t dev)
 		return (err);
 	}
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	err = bus_generic_attach(dev);
 	if (err != 0) {
diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c
index 4e95287399e3..26152d1ebf26 100644
--- a/sys/dev/etherswitch/e6000sw/e6000sw.c
+++ b/sys/dev/etherswitch/e6000sw/e6000sw.c
@@ -642,7 +642,7 @@ e6000sw_attach(device_t dev)
 		device_printf(dev, "switch is ready.\n");
 	E6000SW_UNLOCK(sc);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	taskqueue_enqueue_timeout(sc->sc_tq, &sc->sc_tt, hz);
diff --git a/sys/dev/etherswitch/e6000sw/e6060sw.c b/sys/dev/etherswitch/e6000sw/e6060sw.c
index 3ff38abb69a0..5f22b4396a9e 100644
--- a/sys/dev/etherswitch/e6000sw/e6060sw.c
+++ b/sys/dev/etherswitch/e6000sw/e6060sw.c
@@ -306,7 +306,7 @@ e6060sw_attach(device_t dev)
 	if (err != 0)
 		return (err);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	err = bus_generic_attach(dev);
 	if (err != 0)
diff --git a/sys/dev/etherswitch/felix/felix.c b/sys/dev/etherswitch/felix/felix.c
index 6e9bc29e5757..d5b40b3902f3 100644
--- a/sys/dev/etherswitch/felix/felix.c
+++ b/sys/dev/etherswitch/felix/felix.c
@@ -463,7 +463,7 @@ felix_attach(device_t dev)
 	FELIX_UNLOCK(sc);
 
 	/* Allow etherswitch to attach as our child. */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	return (0);
diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c
index 64f61df93db1..f33219244ca1 100644
--- a/sys/dev/etherswitch/infineon/adm6996fc.c
+++ b/sys/dev/etherswitch/infineon/adm6996fc.c
@@ -258,7 +258,7 @@ adm6996fc_attach(device_t dev)
 	if (err != 0)
 		goto failed;
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	err = bus_generic_attach(dev);
 	if (err != 0)
diff --git a/sys/dev/etherswitch/ip17x/ip17x.c b/sys/dev/etherswitch/ip17x/ip17x.c
index 349dc59e09ae..c79ae069d2f0 100644
--- a/sys/dev/etherswitch/ip17x/ip17x.c
+++ b/sys/dev/etherswitch/ip17x/ip17x.c
@@ -257,7 +257,7 @@ ip17x_attach(device_t dev)
 	 */
 	sc->hal.ip17x_set_vlan_mode(sc, ETHERSWITCH_VLAN_PORT);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	err = bus_generic_attach(dev);
 	if (err != 0)
diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c
index ccd7dbffa9e9..bb93a881c6ab 100644
--- a/sys/dev/etherswitch/micrel/ksz8995ma.c
+++ b/sys/dev/etherswitch/micrel/ksz8995ma.c
@@ -308,7 +308,7 @@ ksz8995ma_attach(device_t dev)
 	if (err != 0)
 		goto failed;
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	err = bus_generic_attach(dev);
 	if (err != 0)
diff --git a/sys/dev/etherswitch/mtkswitch/mtkswitch.c b/sys/dev/etherswitch/mtkswitch/mtkswitch.c
index fa96a81b40ef..837362982223 100644
--- a/sys/dev/etherswitch/mtkswitch/mtkswitch.c
+++ b/sys/dev/etherswitch/mtkswitch/mtkswitch.c
@@ -231,7 +231,7 @@ mtkswitch_attach(device_t dev)
 	if (err != 0)
 		return (err);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	err = bus_generic_attach(dev);
 	DPRINTF(dev, "%s: bus_generic_attach: err=%d\n", __func__, err);
diff --git a/sys/dev/etherswitch/rtl8366/rtl8366rb.c b/sys/dev/etherswitch/rtl8366/rtl8366rb.c
index e57b11f3270f..a2a847bff621 100644
--- a/sys/dev/etherswitch/rtl8366/rtl8366rb.c
+++ b/sys/dev/etherswitch/rtl8366/rtl8366rb.c
@@ -254,7 +254,7 @@ rtl8366rb_attach(device_t dev)
 		}
 	}
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	err = bus_generic_attach(dev);
 	if (err != 0)
diff --git a/sys/dev/etherswitch/ukswitch/ukswitch.c b/sys/dev/etherswitch/ukswitch/ukswitch.c
index f2cf6ef74e90..c0f67310196f 100644
--- a/sys/dev/etherswitch/ukswitch/ukswitch.c
+++ b/sys/dev/etherswitch/ukswitch/ukswitch.c
@@ -209,7 +209,7 @@ ukswitch_attach(device_t dev)
 	if (err != 0)
 		return (err);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	err = bus_generic_attach(dev);
 	if (err != 0)
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c
index 93a414405c17..1346cb255580 100644
--- a/sys/dev/firewire/firewire.c
+++ b/sys/dev/firewire/firewire.c
@@ -452,7 +452,7 @@ firewire_attach(device_t dev)
 	    0, 0, "fw%d_probe", unit);
 
 	/* Locate our children */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/* launch attachement of the added children */
 	bus_generic_attach(dev);
diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c
index f16ce1e26565..603915a1e637 100644
--- a/sys/dev/firewire/fwohci_pci.c
+++ b/sys/dev/firewire/fwohci_pci.c
@@ -314,7 +314,7 @@ fwohci_pci_attach(device_t self)
 	}
 
 	/* probe and attach a child device(firewire) */
-	bus_generic_probe(self);
+	bus_identify_children(self);
 	bus_generic_attach(self);
 
 	return 0;
diff --git a/sys/dev/firmware/arm/scmi.c b/sys/dev/firmware/arm/scmi.c
index ef4bcbf13996..afabdcf9917b 100644
--- a/sys/dev/firmware/arm/scmi.c
+++ b/sys/dev/firmware/arm/scmi.c
@@ -174,7 +174,7 @@ scmi_attach(device_t dev)
 	/*
 	 * Allow devices to identify.
 	 */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/*
 	 * Now walk the OFW tree and attach top-level devices.
diff --git a/sys/dev/gpio/dwgpio/dwgpio_bus.c b/sys/dev/gpio/dwgpio/dwgpio_bus.c
index 48de7dc327eb..7aa681d7aaad 100644
--- a/sys/dev/gpio/dwgpio/dwgpio_bus.c
+++ b/sys/dev/gpio/dwgpio/dwgpio_bus.c
@@ -94,7 +94,7 @@ dwgpiobus_attach(device_t dev)
 	/*
 	 * Allow devices to identify.
 	 */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/*
 	 * Now walk the OFW tree and attach top-level devices.
diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c
index 6b0f8e5ed3ff..4632f0dcd911 100644
--- a/sys/dev/gpio/gpiobus.c
+++ b/sys/dev/gpio/gpiobus.c
@@ -560,7 +560,7 @@ gpiobus_attach(device_t dev)
 	/*
 	 * Get parent's pins and mark them as unmapped
 	 */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 
 	return (bus_generic_attach(dev));
diff --git a/sys/dev/gpio/ofw_gpiobus.c b/sys/dev/gpio/ofw_gpiobus.c
index 8cadc12934e0..ee52748a8c6b 100644
--- a/sys/dev/gpio/ofw_gpiobus.c
+++ b/sys/dev/gpio/ofw_gpiobus.c
@@ -425,7 +425,7 @@ ofw_gpiobus_attach(device_t dev)
 	err = gpiobus_init_softc(dev);
 	if (err != 0)
 		return (err);
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	/*
 	 * Attach the children represented in the device tree.
diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c
index 548027b0320a..596f9d2e6cd4 100644
--- a/sys/dev/hid/hidbus.c
+++ b/sys/dev/hid/hidbus.c
@@ -267,7 +267,7 @@ hidbus_attach_children(device_t dev)
 	 * attach twice in that case.
 	 */
 	sc->nest++;
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	sc->nest--;
 	if (sc->nest != 0)
 		return (0);
diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c
index 5d0b23a09213..672f94f5fd85 100644
--- a/sys/dev/hyperv/vmbus/vmbus.c
+++ b/sys/dev/hyperv/vmbus/vmbus.c
@@ -559,7 +559,7 @@ vmbus_scan(struct vmbus_softc *sc)
 	/*
 	 * Identify, probe and attach for non-channel devices.
 	 */
-	bus_generic_probe(sc->vmbus_dev);
+	bus_identify_children(sc->vmbus_dev);
 	bus_generic_attach(sc->vmbus_dev);
 
 	/*
diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c
index f48338865e0a..bfc86ebe28a9 100644
--- a/sys/dev/iicbus/iicbus.c
+++ b/sys/dev/iicbus/iicbus.c
@@ -125,7 +125,7 @@ iicbus_attach_common(device_t dev, u_int bus_freq)
 	}
 	printf("\n");
 #endif
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	bus_generic_attach(dev);
         return (0);
diff --git a/sys/dev/iicbus/ofw_iicbus.c b/sys/dev/iicbus/ofw_iicbus.c
index 04fc611d37cf..4b0494f8fcc4 100644
--- a/sys/dev/iicbus/ofw_iicbus.c
+++ b/sys/dev/iicbus/ofw_iicbus.c
@@ -127,7 +127,7 @@ ofw_iicbus_attach(device_t dev)
 	
 	iicbus_reset(dev, IIC_FASTEST, 0, NULL);
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 
 	/*
diff --git a/sys/dev/mdio/mdio.c b/sys/dev/mdio/mdio.c
index 64d3b23c2372..827165ccd349 100644
--- a/sys/dev/mdio/mdio.c
+++ b/sys/dev/mdio/mdio.c
@@ -54,7 +54,7 @@ static int
 mdio_attach(device_t dev)
 {
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	return (bus_generic_attach(dev));
 }
diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c
index a79413157a68..ae4863b45c0f 100644
--- a/sys/dev/ofw/ofw_cpu.c
+++ b/sys/dev/ofw/ofw_cpu.c
@@ -297,7 +297,7 @@ ofw_cpu_attach(device_t dev)
 	if (sc->sc_nominal_mhz != 0 && bootverbose)
 		device_printf(dev, "Nominal frequency %dMhz\n",
 		    sc->sc_nominal_mhz);
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	return (bus_generic_attach(dev));
 }
 
diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c
index 51e6072ad4ba..af1a85fecc9e 100644
--- a/sys/dev/ofw/ofwbus.c
+++ b/sys/dev/ofw/ofwbus.c
@@ -117,7 +117,7 @@ ofwbus_attach(device_t dev)
 	/*
 	 * Allow devices to identify.
 	 */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/*
 	 * Now walk the OFW tree and attach top-level devices.
diff --git a/sys/dev/pci/hostb_pci.c b/sys/dev/pci/hostb_pci.c
index 8b3e29c00d5f..2d9e35e07bab 100644
--- a/sys/dev/pci/hostb_pci.c
+++ b/sys/dev/pci/hostb_pci.c
@@ -69,7 +69,7 @@ static int
 pci_hostb_attach(device_t dev)
 {
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/*
 	 * If AGP capabilities are present on this device, then create
diff --git a/sys/dev/pci/isa_pci.c b/sys/dev/pci/isa_pci.c
index c8ad277edb41..f63c63afc384 100644
--- a/sys/dev/pci/isa_pci.c
+++ b/sys/dev/pci/isa_pci.c
@@ -160,7 +160,7 @@ static int
 isab_pci_attach(device_t dev)
 {
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	return (isab_attach(dev));
 }
 
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 5a4749933574..2f86171e5ea9 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -366,7 +366,7 @@ static int
 vga_pci_attach(device_t dev)
 {
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/* Always create a drmn child for now to make it easier on drm. */
 	device_add_child(dev, "drmn", DEVICE_UNIT_ANY);
diff --git a/sys/dev/ppbus/ppbconf.c b/sys/dev/ppbus/ppbconf.c
index 469b2ecd045f..1f82df001b49 100644
--- a/sys/dev/ppbus/ppbconf.c
+++ b/sys/dev/ppbus/ppbconf.c
@@ -404,7 +404,7 @@ ppbus_attach(device_t dev)
 	}
 
 	/* Locate our children */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 #ifndef DONTPROBE_1284
 	/* detect IEEE1284 compliant devices */
diff --git a/sys/dev/pwm/ofw_pwmbus.c b/sys/dev/pwm/ofw_pwmbus.c
index 2d2c47291bca..6bc1a63ccde9 100644
--- a/sys/dev/pwm/ofw_pwmbus.c
+++ b/sys/dev/pwm/ofw_pwmbus.c
@@ -184,7 +184,7 @@ ofw_pwmbus_attach(device_t dev)
 		}
 	}
 	bus_enumerate_hinted_children(dev);
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	return (bus_generic_attach(dev));
 }
diff --git a/sys/dev/pwm/pwmbus.c b/sys/dev/pwm/pwmbus.c
index e4feaa95e590..1ead8fd7a65d 100644
--- a/sys/dev/pwm/pwmbus.c
+++ b/sys/dev/pwm/pwmbus.c
@@ -182,7 +182,7 @@ pwmbus_attach(device_t dev)
 	}
 
 	bus_enumerate_hinted_children(dev);
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	return (bus_generic_attach(dev));
 }
diff --git a/sys/dev/sdhci/fsl_sdhci.c b/sys/dev/sdhci/fsl_sdhci.c
index c3c1b6207a23..91a0daa3e3b4 100644
--- a/sys/dev/sdhci/fsl_sdhci.c
+++ b/sys/dev/sdhci/fsl_sdhci.c
@@ -925,7 +925,7 @@ fsl_sdhci_attach(device_t dev)
 	sdhci_init_slot(dev, &sc->slot, 0);
 	sc->slot_init_done = true;
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	sdhci_start_slot(&sc->slot);
diff --git a/sys/dev/smbus/smbus.c b/sys/dev/smbus/smbus.c
index b0983fa32c30..1ba824b69b53 100644
--- a/sys/dev/smbus/smbus.c
+++ b/sys/dev/smbus/smbus.c
@@ -67,7 +67,7 @@ smbus_attach(device_t dev)
 	struct smbus_softc *sc = device_get_softc(dev);
 
 	mtx_init(&sc->lock, device_get_nameunit(dev), "smbus", MTX_DEF);
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 	bus_generic_attach(dev);
 
diff --git a/sys/dev/spibus/ofw_spibus.c b/sys/dev/spibus/ofw_spibus.c
index 57a5f562c9b3..caa36644dc80 100644
--- a/sys/dev/spibus/ofw_spibus.c
+++ b/sys/dev/spibus/ofw_spibus.c
@@ -83,7 +83,7 @@ ofw_spibus_attach(device_t dev)
 
 	sc->dev = dev;
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_enumerate_hinted_children(dev);
 
 	/*
diff --git a/sys/dev/sram/mmio_sram.c b/sys/dev/sram/mmio_sram.c
index c1d024459650..b9a104760194 100644
--- a/sys/dev/sram/mmio_sram.c
+++ b/sys/dev/sram/mmio_sram.c
@@ -94,7 +94,7 @@ mmio_sram_attach(device_t dev)
 	/*
 	 * Allow devices to identify.
 	 */
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 
 	/*
 	 * Now walk the OFW tree and attach top-level devices.
diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c
index 7dbd7d30907a..fe049a5d5419 100644
--- a/sys/dev/superio/superio.c
+++ b/sys/dev/superio/superio.c
@@ -717,7 +717,7 @@ superio_attach(device_t dev)
 		    sc->known_devices[i].ldn);
 	}
 
-	bus_generic_probe(dev);
+	bus_identify_children(dev);
 	bus_generic_attach(dev);
 
 	sc->chardev = make_dev(&superio_cdevsw, device_get_unit(dev),
diff --git a/sys/dev/xen/bus/xenpv.c b/sys/dev/xen/bus/xenpv.c
index 5073b93b24f1..cc4b4bea4537 100644
--- a/sys/dev/xen/bus/xenpv.c
+++ b/sys/dev/xen/bus/xenpv.c
@@ -126,9 +126,7 @@ xenpv_attach(device_t dev)
 	 * can find.  Once that is done attach any devices that we
 	 * found.
 	 */
-	error = bus_generic_probe(dev);
-	if (error)
-		return (error);
+	bus_identify_children(dev);
*** 137 LINES SKIPPED ***