aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2010-11-26 21:41:42 +0000
committerMarius Strobl <marius@FreeBSD.org>2010-11-26 21:41:42 +0000
commit60c1e4c4056c26820e81a79b5fa5c9fa91710b42 (patch)
tree10cc775e6918158ea957a1ded68aad3999f2d252
parentaa8f5ab65e7e384c16151b8843f221370034f0b7 (diff)
downloadsrc-60c1e4c4056c26820e81a79b5fa5c9fa91710b42.tar.gz
src-60c1e4c4056c26820e81a79b5fa5c9fa91710b42.zip
Ensure Bay flow control is disabled as we're going to use IEEE 802.3 annex
31B full duplex flow control instead.
Notes
Notes: svn path=/head/; revision=215905
-rw-r--r--sys/dev/mii/inphy.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/mii/inphy.c b/sys/dev/mii/inphy.c
index 1293641a98f9..30ba9aeeeacc 100644
--- a/sys/dev/mii/inphy.c
+++ b/sys/dev/mii/inphy.c
@@ -77,6 +77,7 @@ DRIVER_MODULE(inphy, miibus, inphy_driver, inphy_devclass, 0, 0);
static int inphy_service(struct mii_softc *, struct mii_data *, int);
static void inphy_status(struct mii_softc *);
+static void inphy_reset(struct mii_softc *);
static const struct mii_phydesc inphys[] = {
MII_PHY_DESC(INTEL, I82553C),
@@ -119,7 +120,7 @@ inphy_attach(device_t dev)
IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst),
MII_MEDIA_100_TX, NULL);
- mii_phy_reset(sc);
+ inphy_reset(sc);
sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
device_printf(dev, " ");
@@ -206,3 +207,14 @@ inphy_status(struct mii_softc *sc)
} else
mii->mii_media_active = ife->ifm_media;
}
+
+static void
+inphy_reset(struct mii_softc *sc)
+{
+
+ mii_phy_reset(sc);
+
+ /* Ensure Bay flow control is disabled. */
+ PHY_WRITE(sc, MII_INPHY_SCR,
+ PHY_READ(sc, MII_INPHY_SCR) & ~SCR_FLOWCTL);
+}