diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-04-24 21:13:34 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-04-24 21:13:34 +0000 |
commit | 564d08ef1340191bc6300f981e2ebc4c4605e1d1 (patch) | |
tree | 844b3eb8a889f956ebf5070f480b0b06ca800e95 | |
parent | 8e008999c397451e4ba1acca10bd50b1b9901e36 (diff) |
Add simple mii detach routine while waiting for the post-2.7
merge of NetBSD mii work
-rw-r--r-- | sys/dev/mii/mii.c | 14 | ||||
-rw-r--r-- | sys/dev/mii/miivar.h | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 274bbcc357c..625d8980fe2 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mii.c,v 1.6 1999/12/07 22:01:31 jason Exp $ */ +/* $OpenBSD: mii.c,v 1.7 2000/04/24 21:13:33 niklas Exp $ */ /* $NetBSD: mii.c,v 1.9 1998/11/05 04:08:02 thorpej Exp $ */ /*- @@ -118,6 +118,18 @@ mii_phy_probe(parent, mii, capmask) } int +mii_detach(msc, flags) + struct mii_softc *msc; + int flags; +{ + LIST_REMOVE(msc, mii_list); + /* XXX The following condition should always be true. */ + if (msc->mii_inst == msc->mii_pdata->mii_instance - 1) + msc->mii_pdata->mii_instance--; + return config_detach(&msc->mii_dev, flags); +} + +int mii_print(aux, pnp) void *aux; const char *pnp; diff --git a/sys/dev/mii/miivar.h b/sys/dev/mii/miivar.h index 717d13788a0..eeb5872286c 100644 --- a/sys/dev/mii/miivar.h +++ b/sys/dev/mii/miivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: miivar.h,v 1.4 1999/12/07 22:01:31 jason Exp $ */ +/* $OpenBSD: miivar.h,v 1.5 2000/04/24 21:13:33 niklas Exp $ */ /* $NetBSD: miivar.h,v 1.7.6.1 1999/04/23 15:40:35 perry Exp $ */ /*- @@ -179,6 +179,7 @@ void mii_tick __P((struct mii_data *)); void mii_pollstat __P((struct mii_data *)); void mii_down __P((struct mii_data *)); void mii_phy_probe __P((struct device *, struct mii_data *, int)); +int mii_detach __P((struct mii_softc *, int)); void mii_add_media __P((struct mii_softc *)); void mii_phy_setmedia __P((struct mii_softc *)); |