diff options
author | phk <phk@FreeBSD.org> | 2002-04-29 13:07:38 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-04-29 13:07:38 +0000 |
commit | f991342a3516788d7bdcf299d43518fc006fafe2 (patch) | |
tree | bb7ef32db222f40e58ca8b187557f694d084d314 /sys/dev/mii/tdkphy.c | |
parent | 0dd30d20d385d2160bcbfeacccc269aa1da113b6 (diff) | |
download | FreeBSD-src-f991342a3516788d7bdcf299d43518fc006fafe2.zip FreeBSD-src-f991342a3516788d7bdcf299d43518fc006fafe2.tar.gz |
Make one generic mii_phy_detach() to replace 19 slightly different ones.
Rename mii_phy_auto_stop() mii_phy_down().
Introduce mii_down(), use it from nge. Do not indirect it to 19 identical
case's in 19 switchstatements like NetBSD did.
Diffstat (limited to 'sys/dev/mii/tdkphy.c')
-rw-r--r-- | sys/dev/mii/tdkphy.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/dev/mii/tdkphy.c b/sys/dev/mii/tdkphy.c index 2017abf..a5f08b3 100644 --- a/sys/dev/mii/tdkphy.c +++ b/sys/dev/mii/tdkphy.c @@ -71,13 +71,12 @@ static const char rcsid[] = static int tdkphy_probe (device_t); static int tdkphy_attach (device_t); -static int tdkphy_detach (device_t); static device_method_t tdkphy_methods[] = { /* device interface */ DEVMETHOD(device_probe, tdkphy_probe), DEVMETHOD(device_attach, tdkphy_attach), - DEVMETHOD(device_detach, tdkphy_detach), + DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), { 0, 0 } }; @@ -157,20 +156,6 @@ tdkphy_attach(device_t dev) return(0); } -static int tdkphy_detach(device_t dev) -{ - struct mii_softc *sc; - struct mii_data *mii; - - sc = device_get_softc(dev); - mii = device_get_softc(device_get_parent(dev)); - mii_phy_auto_stop(sc); - sc->mii_dev = NULL; - LIST_REMOVE(sc, mii_list); - - return(0); -} - static int tdkphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) { |