diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-10-08 01:01:07 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-10-08 01:01:07 +0000 |
commit | 573b52151121739126f49df85e2287bf172ba56f (patch) | |
tree | bc7b1029f74465a2543bb97848a88494123eb1c6 /sys | |
parent | c36aa6c528514c319bc0f49eca798232915fa25e (diff) |
set Jumbo frame settings for Jumbo capable bge(4) adapters.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/mii/brgphy.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index aecfad8b18d..f621f27c7ce 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brgphy.c,v 1.55 2006/10/08 00:28:35 brad Exp $ */ +/* $OpenBSD: brgphy.c,v 1.56 2006/10/08 01:01:06 brad Exp $ */ /* * Copyright (c) 2000 @@ -496,6 +496,22 @@ brgphy_reset(struct mii_softc *sc) brgphy_ber_bug(sc); if (bge_sc->bge_flags & BGE_PHY_JITTER_BUG) brgphy_jitter_bug(sc); + if (bge_sc->bge_flags & BGE_JUMBO_CAP) { + /* Set Jumbo frame settings in the PHY. */ + if (sc->mii_model == MII_MODEL_BROADCOM_BCM5401) { + /* Cannot do read-modify-write on the BCM5401 */ + PHY_WRITE(sc, BRGPHY_MII_AUXCTL, 0x4c20); + } else { + PHY_WRITE(sc, BRGPHY_MII_AUXCTL, 0x7); + val = PHY_READ(sc, BRGPHY_MII_AUXCTL); + PHY_WRITE(sc, BRGPHY_MII_AUXCTL, + val & ~(BRGPHY_AUXCTL_LONG_PKT | 0x7)); + } + + val = PHY_READ(sc, BRGPHY_MII_PHY_EXTCTL); + PHY_WRITE(sc, BRGPHY_MII_PHY_EXTCTL, + val & ~BRGPHY_PHY_EXTCTL_HIGH_LA); + } /* * Enable Ethernet@WireSpeed. |