diff options
author | Warner Losh <imp@FreeBSD.org> | 2021-12-09 23:52:44 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2021-12-10 00:04:57 +0000 |
commit | d14bc7230ba5c26de7d793ae3947e7571dc8fb7c (patch) | |
tree | a7c3c8fff392e6d2e98f1565c74239a98b9e1515 /sys/kern/subr_bus.c | |
parent | 815a0973b23cf97e3e6c2d8bd34d98d54e318873 (diff) | |
download | src-d14bc7230ba5c26de7d793ae3947e7571dc8fb7c.tar.gz src-d14bc7230ba5c26de7d793ae3947e7571dc8fb7c.zip |
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r-- | sys/kern/subr_bus.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 2544826e9028..a5d0fc773787 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -867,6 +867,13 @@ static kobj_method_t null_methods[] = { DEFINE_CLASS(null, null_methods, 0); +void +bus_topo_assert() +{ + + GIANT_REQUIRED; +} + struct mtx * bus_topo_mtx(void) { @@ -2102,7 +2109,7 @@ device_probe_child(device_t dev, device_t child) /* We should preserve the devclass (or lack of) set by the bus. */ int hasclass = (child->devclass != NULL); - GIANT_REQUIRED; + bus_topo_assert(); dc = dev->devclass; if (!dc) @@ -2920,7 +2927,7 @@ device_probe(device_t dev) { int error; - GIANT_REQUIRED; + bus_topo_assert(); if (dev->state >= DS_ALIVE) return (-1); @@ -2954,7 +2961,7 @@ device_probe_and_attach(device_t dev) { int error; - GIANT_REQUIRED; + bus_topo_assert(); error = device_probe(dev); if (error == -1) @@ -3052,7 +3059,7 @@ device_detach(device_t dev) { int error; - GIANT_REQUIRED; + bus_topo_assert(); PDEBUG(("%s", DEVICENAME(dev))); if (dev->busy > 0) |