diff options
Diffstat (limited to 'sys/dev/mii/urlphy.c')
-rw-r--r-- | sys/dev/mii/urlphy.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/mii/urlphy.c b/sys/dev/mii/urlphy.c index 5a4d1fca5ea..cf13faa3235 100644 --- a/sys/dev/mii/urlphy.c +++ b/sys/dev/mii/urlphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: urlphy.c,v 1.4 2004/09/20 06:05:27 brad Exp $ */ +/* $OpenBSD: urlphy.c,v 1.5 2004/09/26 00:59:58 brad Exp $ */ /* $NetBSD: urlphy.c,v 1.1 2002/03/28 21:07:53 ichiro Exp $ */ /* * Copyright (c) 2001, 2002 @@ -76,6 +76,10 @@ struct cfdriver urlphy_cd = { int urlphy_service(struct mii_softc *, struct mii_data *, int); void urlphy_status(struct mii_softc *); +const struct mii_phy_funcs urlphy_funcs = { + urlphy_service, urlphy_status, mii_phy_reset, +}; + int urlphy_match(struct device *parent, void *match, void *aux) { @@ -108,8 +112,7 @@ urlphy_attach(struct device *parent, struct device *self, void *aux) sc->mii_inst = mii->mii_instance; sc->mii_phy = ma->mii_phyno; - sc->mii_service = urlphy_service; - sc->mii_status = urlphy_status; + sc->mii_funcs = &urlphy_funcs; sc->mii_pdata = mii; sc->mii_flags = mii->mii_flags; sc->mii_anegticks = 10; @@ -124,7 +127,7 @@ urlphy_attach(struct device *parent, struct device *self, void *aux) sc->mii_dev.dv_xname); return; } - mii_phy_reset(sc); + PHY_RESET(sc); sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; if (sc->mii_capabilities & BMSR_MEDIAMASK) @@ -198,7 +201,7 @@ urlphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) return (0); sc->mii_ticks = 0; - mii_phy_reset(sc); + PHY_RESET(sc); if (mii_phy_auto(sc, 0) == EJUSTRETURN) return (0); |