diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-11-07 22:52:16 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-11-07 22:52:16 +0000 |
commit | c5c0bae2e68742627acbd80fdf3c142f47eea12b (patch) | |
tree | 4d08c2187fc216ea7bddd966e19d4e19ee22b213 | |
parent | 112b8ca85edefbbf277372ae4e5a0601ccf36ca1 (diff) |
When initializing the MAC put the PHY into ready state for BCM5906
chipsets.
From the Linux tg3 driver via FreeBSD.
Tested by Jordi Creix <jbcreix dot mail at gmail dot com>
-rw-r--r-- | sys/dev/pci/if_bge.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index d58ab8dad4b..ab229d0eaea 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.249 2008/10/19 08:13:01 brad Exp $ */ +/* $OpenBSD: if_bge.c,v 1.250 2008/11/07 22:52:15 brad Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -1316,6 +1316,15 @@ bge_chipinit(struct bge_softc *sc) /* Set the timer prescaler (always 66MHz) */ CSR_WRITE_4(sc, BGE_MISC_CFG, 65 << 1/*BGE_32BITTIME_66MHZ*/); + + if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5906) { + DELAY(40); /* XXX */ + + /* Put PHY into ready state */ + BGE_CLRBIT(sc, BGE_MISC_CFG, BGE_MISCCFG_EPHY_IDDQ); + CSR_READ_4(sc, BGE_MISC_CFG); /* Flush */ + DELAY(40); + } } int |