aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mii/qsphy.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-04-29 13:07:38 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-04-29 13:07:38 +0000
commit279fe8d15669ab601a2b4d94cce9e607d8012b0b (patch)
treebb7ef32db222f40e58ca8b187557f694d084d314 /sys/dev/mii/qsphy.c
parentccc4300e95754fa2e86a6a028f72679cf9c970be (diff)
downloadsrc-279fe8d15669ab601a2b4d94cce9e607d8012b0b.tar.gz
src-279fe8d15669ab601a2b4d94cce9e607d8012b0b.zip
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.
Notes
Notes: svn path=/head/; revision=95722
Diffstat (limited to 'sys/dev/mii/qsphy.c')
-rw-r--r--sys/dev/mii/qsphy.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/dev/mii/qsphy.c b/sys/dev/mii/qsphy.c
index cdb1e4c4657c..a8f3432b6748 100644
--- a/sys/dev/mii/qsphy.c
+++ b/sys/dev/mii/qsphy.c
@@ -98,13 +98,12 @@ static const char rcsid[] =
static int qsphy_probe (device_t);
static int qsphy_attach (device_t);
-static int qsphy_detach (device_t);
static device_method_t qsphy_methods[] = {
/* device interface */
DEVMETHOD(device_probe, qsphy_probe),
DEVMETHOD(device_attach, qsphy_attach),
- DEVMETHOD(device_detach, qsphy_detach),
+ DEVMETHOD(device_detach, mii_phy_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
{ 0, 0 }
};
@@ -172,20 +171,6 @@ static int qsphy_attach(dev)
return (0);
}
-static int qsphy_detach(dev)
- device_t dev;
-{
- struct mii_softc *sc;
- struct mii_data *mii;
-
- sc = device_get_softc(dev);
- mii = device_get_softc(device_get_parent(dev));
- sc->mii_dev = NULL;
- LIST_REMOVE(sc, mii_list);
-
- return(0);
-}
-
static int
qsphy_service(sc, mii, cmd)
struct mii_softc *sc;