aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mii/mii.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mii/mii.c')
-rw-r--r--sys/dev/mii/mii.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c
index dde79c189322..b63bfb6285bb 100644
--- a/sys/dev/mii/mii.c
+++ b/sys/dev/mii/mii.c
@@ -147,7 +147,8 @@ miibus_attach(device_t dev)
if_setcapenablebit(mii->mii_ifp, IFCAP_LINKSTATE, 0);
LIST_INIT(&mii->mii_phys);
- return (bus_generic_attach(dev));
+ bus_attach_children(dev);
+ return (0);
}
static int
@@ -520,16 +521,12 @@ mii_attach(device_t dev, device_t *miibus, if_t ifp,
rv = ENXIO;
goto fail;
}
- rv = bus_generic_attach(dev);
- if (rv != 0)
- goto fail;
+ bus_attach_children(dev);
/* Attaching of the PHY drivers is done in miibus_attach(). */
return (0);
}
- rv = bus_generic_attach(*miibus);
- if (rv != 0)
- goto fail;
+ bus_attach_children(*miibus);
return (0);