summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/mii.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-04-29 13:07:38 +0000
committerphk <phk@FreeBSD.org>2002-04-29 13:07:38 +0000
commitf991342a3516788d7bdcf299d43518fc006fafe2 (patch)
treebb7ef32db222f40e58ca8b187557f694d084d314 /sys/dev/mii/mii.c
parent0dd30d20d385d2160bcbfeacccc269aa1da113b6 (diff)
downloadFreeBSD-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/mii.c')
-rw-r--r--sys/dev/mii/mii.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c
index 078ce4d..9a63276 100644
--- a/sys/dev/mii/mii.c
+++ b/sys/dev/mii/mii.c
@@ -363,3 +363,15 @@ mii_pollstat(mii)
LIST_FOREACH(child, &mii->mii_phys, mii_list)
(void) (*child->mii_service)(child, mii, MII_POLLSTAT);
}
+
+/*
+ * Inform the PHYs that the interface is down.
+ */
+void
+mii_down(struct mii_data *mii)
+{
+ struct mii_softc *child;
+
+ LIST_FOREACH(child, &mii->mii_phys, mii_list)
+ mii_phy_down(child);
+}
OpenPOWER on IntegriCloud