diff options
author | 2001-04-14 03:22:43 +0000 | |
---|---|---|
committer | 2001-04-14 03:22:43 +0000 | |
commit | 42aae0b2dfb76d48e80e50beed8a84809e77da8c (patch) | |
tree | a218e62d1f398a23f94170e3b330857a125e9716 | |
parent | Forgot remove 'U' from optstring; millert@ ok. ;) (diff) | |
download | wireguard-openbsd-42aae0b2dfb76d48e80e50beed8a84809e77da8c.tar.xz wireguard-openbsd-42aae0b2dfb76d48e80e50beed8a84809e77da8c.zip |
Add an lxtphy_reset function; from NetBSD. Tested on a NewMedia LiveWire
10/100 PCMCIA Ethernet card.
-rw-r--r-- | sys/dev/mii/lxtphy.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/mii/lxtphy.c b/sys/dev/mii/lxtphy.c index 6b7e8ddc2dd..b0340b2ce39 100644 --- a/sys/dev/mii/lxtphy.c +++ b/sys/dev/mii/lxtphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lxtphy.c,v 1.5 2000/08/26 20:04:17 nate Exp $ */ +/* $OpenBSD: lxtphy.c,v 1.6 2001/04/14 03:22:43 aaron Exp $ */ /* $NetBSD: lxtphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp $ */ /*- @@ -103,6 +103,7 @@ struct cfdriver lxtphy_cd = { int lxtphy_service __P((struct mii_softc *, struct mii_data *, int)); void lxtphy_status __P((struct mii_softc *)); +void lxtphy_reset __P((struct mii_softc *)); int lxtphymatch(parent, match, aux) @@ -138,7 +139,7 @@ lxtphyattach(parent, self, aux) sc->mii_pdata = mii; sc->mii_flags = mii->mii_flags; - mii_phy_reset(sc); + lxtphy_reset(sc); sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; @@ -257,3 +258,12 @@ lxtphy_status(sc) } else mii->mii_media_active = ife->ifm_media; } + +void +lxtphy_reset(sc) + struct mii_softc *sc; +{ + mii_phy_reset(sc); + PHY_WRITE(sc, MII_LXTPHY_IER, + PHY_READ(sc, MII_LXTPHY_IER) & ~IER_INTEN); +} |