diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-04-26 21:26:43 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-04-26 21:26:43 +0000 |
commit | 098d59e6fd1c5402c7400866d0b275efe074545d (patch) | |
tree | 3ec83b0de79e10c7b0b04218f4fac37720f8dca6 | |
parent | 95640319444d841f50b02ef8d23f918ffe3d55ef (diff) |
Adjust the output voltage for BCM5906 PHY otherwise it might not be
possible to obtain a link under some circumstances which are unknown
at the moment.
From the Linux tg3 driver.
Issue reported by Kamil Andrusz <wizz at mniam dot net>
ok kettenis@
-rw-r--r-- | sys/dev/mii/brgphy.c | 6 | ||||
-rw-r--r-- | sys/dev/mii/brgphyreg.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index e35ee7fe46a..c95d9e8fa8f 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brgphy.c,v 1.76 2008/04/20 01:32:43 brad Exp $ */ +/* $OpenBSD: brgphy.c,v 1.77 2008/04/26 21:26:42 brad Exp $ */ /* * Copyright (c) 2000 @@ -509,6 +509,10 @@ brgphy_reset(struct mii_softc *sc) if (bge_sc->bge_flags & BGE_JUMBO_CAP) brgphy_jumbo_settings(sc); + /* Adjust output voltage */ + if (sc->mii_model == MII_MODEL_BROADCOM2_BCM5906) + PHY_WRITE(sc, BRGPHY_MII_EPHY_PTEST, 0x12); + /* Enable Ethernet@Wirespeed */ if (!(bge_sc->bge_flags & BGE_NO_ETH_WIRE_SPEED)) brgphy_eth_wirespeed(sc); diff --git a/sys/dev/mii/brgphyreg.h b/sys/dev/mii/brgphyreg.h index 37b4731a159..2f1edbfb76e 100644 --- a/sys/dev/mii/brgphyreg.h +++ b/sys/dev/mii/brgphyreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: brgphyreg.h,v 1.10 2008/03/21 21:29:21 brad Exp $ */ +/* $OpenBSD: brgphyreg.h,v 1.11 2008/04/26 21:26:42 brad Exp $ */ /* * Copyright (c) 2000 @@ -162,6 +162,7 @@ #define BRGPHY_MII_DSP_RW_PORT 0x15 /* DSP coefficient r/w port */ +#define BRGPHY_MII_EPHY_PTEST 0x17 /* 5906 PHY register */ #define BRGPHY_MII_DSP_ADDR_REG 0x17 /* DSP coefficient addr register */ #define BRGPHY_DSP_TAP_NUMBER_MASK 0x00 |