summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2001-04-14 03:22:44 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2001-04-14 03:22:44 +0000
commit532399a8cfd18f33c4f31d4e26f354b608db388d (patch)
treed1f7e1ac2676b0c2aaf7957b9b81adfdb3329ac8 /sys
parentec93112015f37a33181b42f3dcaed8d956ba7e30 (diff)
Add an lxtphy_reset function; from NetBSD. Tested on a NewMedia LiveWire
10/100 PCMCIA Ethernet card.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/mii/lxtphy.c14
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);
+}