diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2004-09-26 00:59:59 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2004-09-26 00:59:59 +0000 |
commit | 8e8d95d27df054585cfa2d500a840a20e3ebf363 (patch) | |
tree | 8943a7f0c99b56b78d31cd3c72aa1427b2ebc9db /sys/dev/mii/mii.c | |
parent | 2d35bc93d317846717f475b07c067c11816dae9d (diff) |
Restructure the PHY entry points to use a structure of
entry points instead of descrete function pointers, and
extend this to include a "reset" entry point. Make sure
any PHY-specific reset routine is always used.
From NetBSD
ok mcbride@
Diffstat (limited to 'sys/dev/mii/mii.c')
-rw-r--r-- | sys/dev/mii/mii.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 8bc95c8acab..5c1ad430081 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mii.c,v 1.12 2002/10/12 01:09:44 krw Exp $ */ +/* $OpenBSD: mii.c,v 1.13 2004/09/26 00:59:58 brad Exp $ */ /* $NetBSD: mii.c,v 1.19 2000/02/02 17:09:44 thorpej Exp $ */ /*- @@ -271,7 +271,7 @@ mii_mediachg(mii) for (child = LIST_FIRST(&mii->mii_phys); child != NULL; child = LIST_NEXT(child, mii_list)) { - rv = (*child->mii_service)(child, mii, MII_MEDIACHG); + rv = PHY_SERVICE(child, mii, MII_MEDIACHG); if (rv) return (rv); } @@ -289,7 +289,7 @@ mii_tick(mii) for (child = LIST_FIRST(&mii->mii_phys); child != NULL; child = LIST_NEXT(child, mii_list)) - (void) (*child->mii_service)(child, mii, MII_TICK); + (void) PHY_SERVICE(child, mii, MII_TICK); } /* @@ -306,7 +306,7 @@ mii_pollstat(mii) for (child = LIST_FIRST(&mii->mii_phys); child != NULL; child = LIST_NEXT(child, mii_list)) - (void) (*child->mii_service)(child, mii, MII_POLLSTAT); + (void) PHY_SERVICE(child, mii, MII_POLLSTAT); } /* @@ -320,5 +320,5 @@ mii_down(mii) for (child = LIST_FIRST(&mii->mii_phys); child != NULL; child = LIST_NEXT(child, mii_list)) - (void) (*child->mii_service)(child, mii, MII_DOWN); + (void) PHY_SERVICE(child, mii, MII_DOWN); } |