diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-07-01 20:47:51 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-07-01 20:47:51 +0000 |
commit | 68dccac17a158d4f75f2cfb3476d93ebcf2f494f (patch) | |
tree | 73fbfe3b86f87e00a7c20065b92390ff4f29f817 /sys/dev | |
parent | d9b9ae6c927021d6e6128256fe197d0335c83572 (diff) |
revert rev 1.59
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_bge.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 3c4833b28a4..769c48d9d56 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.69 2005/06/29 04:25:10 brad Exp $ */ +/* $OpenBSD: if_bge.c,v 1.70 2005/07/01 20:47:50 brad Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -3164,6 +3164,23 @@ bge_ifmedia_upd(ifp) return(EINVAL); switch(IFM_SUBTYPE(ifm->ifm_media)) { case IFM_AUTO: + /* + * The BCM5704 ASIC appears to have a special + * mechanism for programming the autoneg + * advertisement registers in TBI mode. + */ + if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5704) { + uint32_t sgdig; + CSR_WRITE_4(sc, BGE_TX_TBI_AUTONEG, 0); + sgdig = CSR_READ_4(sc, BGE_SGDIG_CFG); + sgdig |= BGE_SGDIGCFG_AUTO| + BGE_SGDIGCFG_PAUSE_CAP| + BGE_SGDIGCFG_ASYM_PAUSE; + CSR_WRITE_4(sc, BGE_SGDIG_CFG, + sgdig|BGE_SGDIGCFG_SEND); + DELAY(5); + CSR_WRITE_4(sc, BGE_SGDIG_CFG, sgdig); + } break; case IFM_1000_SX: if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) { |