aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/etherswitch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/etherswitch')
-rw-r--r--sys/dev/etherswitch/ar40xx/ar40xx_main.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch.c7
-rw-r--r--sys/dev/etherswitch/e6000sw/e6000sw.c2
-rw-r--r--sys/dev/etherswitch/e6000sw/e6060sw.c4
-rw-r--r--sys/dev/etherswitch/felix/felix.c2
-rw-r--r--sys/dev/etherswitch/infineon/adm6996fc.c4
-rw-r--r--sys/dev/etherswitch/ip17x/ip17x.c4
-rw-r--r--sys/dev/etherswitch/micrel/ksz8995ma.c4
-rw-r--r--sys/dev/etherswitch/miiproxy.c13
-rw-r--r--sys/dev/etherswitch/mtkswitch/mtkswitch.c5
-rw-r--r--sys/dev/etherswitch/rtl8366/rtl8366rb.c4
-rw-r--r--sys/dev/etherswitch/ukswitch/ukswitch.c4
12 files changed, 16 insertions, 39 deletions
diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_main.c b/sys/dev/etherswitch/ar40xx/ar40xx_main.c
index 979d5bb39444..41e6813bc840 100644
--- a/sys/dev/etherswitch/ar40xx/ar40xx_main.c
+++ b/sys/dev/etherswitch/ar40xx/ar40xx_main.c
@@ -484,7 +484,7 @@ ar40xx_attach(device_t dev)
bus_identify_children(dev);
bus_enumerate_hinted_children(dev);
- ret = bus_generic_attach(dev);
+ bus_attach_children(dev);
/* Start timer */
callout_init_mtx(&sc->sc_phy_callout, &sc->sc_mtx, 0);
diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c
index 395edf3322ae..92c3460e5f78 100644
--- a/sys/dev/etherswitch/arswitch/arswitch.c
+++ b/sys/dev/etherswitch/arswitch/arswitch.c
@@ -651,12 +651,7 @@ arswitch_attach(device_t dev)
bus_identify_children(dev);
bus_enumerate_hinted_children(dev);
- err = bus_generic_attach(dev);
- if (err != 0) {
- DPRINTF(sc, ARSWITCH_DBG_ANY,
- "%s: bus_generic_attach: err=%d\n", __func__, err);
- return (err);
- }
+ bus_attach_children(dev);
callout_init_mtx(&sc->callout_tick, &sc->sc_mtx, 0);
diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c
index 26152d1ebf26..e79082759593 100644
--- a/sys/dev/etherswitch/e6000sw/e6000sw.c
+++ b/sys/dev/etherswitch/e6000sw/e6000sw.c
@@ -643,7 +643,7 @@ e6000sw_attach(device_t dev)
E6000SW_UNLOCK(sc);
bus_identify_children(dev);
- bus_generic_attach(dev);
+ bus_attach_children(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 5f22b4396a9e..374eb8c5316b 100644
--- a/sys/dev/etherswitch/e6000sw/e6060sw.c
+++ b/sys/dev/etherswitch/e6000sw/e6060sw.c
@@ -308,9 +308,7 @@ e6060sw_attach(device_t dev)
bus_identify_children(dev);
bus_enumerate_hinted_children(dev);
- err = bus_generic_attach(dev);
- if (err != 0)
- return (err);
+ bus_attach_children(dev);
callout_init(&sc->callout_tick, 0);
diff --git a/sys/dev/etherswitch/felix/felix.c b/sys/dev/etherswitch/felix/felix.c
index d5b40b3902f3..622cf3bca140 100644
--- a/sys/dev/etherswitch/felix/felix.c
+++ b/sys/dev/etherswitch/felix/felix.c
@@ -464,7 +464,7 @@ felix_attach(device_t dev)
/* Allow etherswitch to attach as our child. */
bus_identify_children(dev);
- bus_generic_attach(dev);
+ bus_attach_children(dev);
return (0);
diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c
index f33219244ca1..2a8ee58107ee 100644
--- a/sys/dev/etherswitch/infineon/adm6996fc.c
+++ b/sys/dev/etherswitch/infineon/adm6996fc.c
@@ -260,9 +260,7 @@ adm6996fc_attach(device_t dev)
bus_identify_children(dev);
bus_enumerate_hinted_children(dev);
- err = bus_generic_attach(dev);
- if (err != 0)
- goto failed;
+ bus_attach_children(dev);
callout_init(&sc->callout_tick, 0);
diff --git a/sys/dev/etherswitch/ip17x/ip17x.c b/sys/dev/etherswitch/ip17x/ip17x.c
index c79ae069d2f0..1eee45148040 100644
--- a/sys/dev/etherswitch/ip17x/ip17x.c
+++ b/sys/dev/etherswitch/ip17x/ip17x.c
@@ -259,9 +259,7 @@ ip17x_attach(device_t dev)
bus_identify_children(dev);
bus_enumerate_hinted_children(dev);
- err = bus_generic_attach(dev);
- if (err != 0)
- return (err);
+ bus_attach_children(dev);
if (sc->miipoll) {
callout_init(&sc->callout_tick, 0);
diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c
index bb93a881c6ab..a51bdb50fdfc 100644
--- a/sys/dev/etherswitch/micrel/ksz8995ma.c
+++ b/sys/dev/etherswitch/micrel/ksz8995ma.c
@@ -310,9 +310,7 @@ ksz8995ma_attach(device_t dev)
bus_identify_children(dev);
bus_enumerate_hinted_children(dev);
- err = bus_generic_attach(dev);
- if (err != 0)
- goto failed;
+ bus_attach_children(dev);
callout_init(&sc->callout_tick, 0);
diff --git a/sys/dev/etherswitch/miiproxy.c b/sys/dev/etherswitch/miiproxy.c
index 3a621eae0875..1974a8d7bbb1 100644
--- a/sys/dev/etherswitch/miiproxy.c
+++ b/sys/dev/etherswitch/miiproxy.c
@@ -265,7 +265,8 @@ miiproxy_attach(device_t dev)
* The ethernet interface needs to call mii_attach_proxy() to pass
* the relevant parameters for rendezvous with the MDIO target.
*/
- return (bus_generic_attach(dev));
+ bus_attach_children(dev);
+ return (0);
}
static int
@@ -348,7 +349,8 @@ mdioproxy_attach(device_t dev)
{
rendezvous_register_target(dev, mdioproxy_rendezvous_callback);
- return (bus_generic_attach(dev));
+ bus_attach_children(dev);
+ return (0);
}
static int
@@ -368,7 +370,6 @@ device_t
mii_attach_proxy(device_t dev)
{
struct miiproxy_softc *sc;
- int error;
const char *name;
device_t miiproxy;
@@ -381,11 +382,7 @@ mii_attach_proxy(device_t dev)
}
miiproxy = device_add_child(dev, miiproxy_driver.name, DEVICE_UNIT_ANY);
- error = bus_generic_attach(dev);
- if (error != 0) {
- device_printf(dev, "can't attach miiproxy\n");
- return (NULL);
- }
+ bus_attach_children(dev);
sc = device_get_softc(miiproxy);
sc->parent = dev;
sc->proxy = miiproxy;
diff --git a/sys/dev/etherswitch/mtkswitch/mtkswitch.c b/sys/dev/etherswitch/mtkswitch/mtkswitch.c
index 837362982223..7c4e8ae6f934 100644
--- a/sys/dev/etherswitch/mtkswitch/mtkswitch.c
+++ b/sys/dev/etherswitch/mtkswitch/mtkswitch.c
@@ -233,10 +233,7 @@ mtkswitch_attach(device_t 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);
- if (err != 0)
- return (err);
+ bus_attach_children(dev);
callout_init_mtx(&sc->callout_tick, &sc->sc_mtx, 0);
diff --git a/sys/dev/etherswitch/rtl8366/rtl8366rb.c b/sys/dev/etherswitch/rtl8366/rtl8366rb.c
index a2a847bff621..304e7f7b8325 100644
--- a/sys/dev/etherswitch/rtl8366/rtl8366rb.c
+++ b/sys/dev/etherswitch/rtl8366/rtl8366rb.c
@@ -256,9 +256,7 @@ rtl8366rb_attach(device_t dev)
bus_identify_children(dev);
bus_enumerate_hinted_children(dev);
- err = bus_generic_attach(dev);
- if (err != 0)
- return (err);
+ bus_attach_children(dev);
callout_init_mtx(&sc->callout_tick, &sc->callout_mtx, 0);
rtl8366rb_tick(sc);
diff --git a/sys/dev/etherswitch/ukswitch/ukswitch.c b/sys/dev/etherswitch/ukswitch/ukswitch.c
index c0f67310196f..ed1a27a19494 100644
--- a/sys/dev/etherswitch/ukswitch/ukswitch.c
+++ b/sys/dev/etherswitch/ukswitch/ukswitch.c
@@ -211,9 +211,7 @@ ukswitch_attach(device_t dev)
bus_identify_children(dev);
bus_enumerate_hinted_children(dev);
- err = bus_generic_attach(dev);
- if (err != 0)
- return (err);
+ bus_attach_children(dev);
callout_init(&sc->callout_tick, 0);