diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -572,6 +572,8 @@ { devclass_t dc; + bus_topo_assert(); + PDEBUG(("looking for %s", classname)); if (!classname) return (NULL); @@ -712,6 +714,8 @@ devclass_t child_dc; const char *parentname; + bus_topo_assert(); + PDEBUG(("%s", DRIVERNAME(driver))); /* Don't allow invalid pass values. */ @@ -784,6 +788,8 @@ device_t dev; int error, i; + bus_topo_assert(); + /* * Disassociate from any devices. We iterate through all the * devices in the devclass of the driver and detach any which are @@ -856,6 +862,8 @@ driverlink_t dl; int error; + bus_topo_assert(); + PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass))); if (!dc) @@ -913,6 +921,8 @@ int i; int error; + bus_topo_assert(); + PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass))); if (!dc) @@ -964,6 +974,8 @@ { driverlink_t dl; + bus_topo_assert(); + PDEBUG(("%s in devclass %s", classname, DEVCLANAME(dc))); TAILQ_FOREACH(dl, &dc->drivers, link) { @@ -5255,6 +5267,8 @@ kobj_class_t driver; int error, pass; + bus_topo_lock(); + dmd = (struct driver_module_data *)arg; bus_devclass = devclass_find_internal(dmd->dmd_busname, NULL, TRUE); error = 0; @@ -5297,6 +5311,8 @@ break; } + bus_topo_unlock(); + return (error); }