diff options
| author | Doug White <dwhite@FreeBSD.org> | 2005-06-24 21:43:47 +0000 |
|---|---|---|
| committer | Doug White <dwhite@FreeBSD.org> | 2005-06-24 21:43:47 +0000 |
| commit | ff50922b1600641d0ce16c132393f9123a681e04 (patch) | |
| tree | d54acc9ef91e8b88cf30c06ab57f48d681befed0 /sys/dev/bge | |
| parent | de1c01ad370948cab879d4adcdcac33e39ef4ecf (diff) | |
Notes
Diffstat (limited to 'sys/dev/bge')
| -rw-r--r-- | sys/dev/bge/if_bge.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index cad9143bd8d3..1633aa37d033 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -108,6 +108,8 @@ __FBSDID("$FreeBSD$"); #include <dev/bge/if_bgereg.h> +#include "opt_bge.h" + #define BGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) MODULE_DEPEND(bge, pci, 1, 1, 1); @@ -3454,6 +3456,25 @@ bge_ifmedia_upd(ifp) return(EINVAL); switch(IFM_SUBTYPE(ifm->ifm_media)) { case IFM_AUTO: +#ifndef BGE_FAKE_AUTONEG + /* + * The BCM5704 ASIC appears to have a special + * mechanism for programming the autoneg + * advertisement registers in TBI mode. + */ + if (sc->bge_asicrev == 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); + } +#endif break; case IFM_1000_SX: if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) { |
