Index: src/sys/dev/bge/if_bge.c =================================================================== RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v retrieving revision 1.90 diff -u -r1.90 if_bge.c --- src/sys/dev/bge/if_bge.c 10 Jun 2005 16:49:05 -0000 1.90 +++ src/sys/dev/bge/if_bge.c 19 Jun 2005 20:42:02 -0000 @@ -108,6 +108,8 @@ #include +#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 @@ 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) { Index: src/sys/conf/options =================================================================== RCS file: /home/ncvs/src/sys/conf/options,v retrieving revision 1.506 diff -u -r1.506 options --- src/sys/conf/options 10 Jun 2005 08:05:12 -0000 1.506 +++ src/sys/conf/options 19 Jun 2005 20:42:02 -0000 @@ -623,6 +623,9 @@ ED_3C503 opt_ed.h ED_SIC opt_ed.h +# bge driver +BGE_FAKE_AUTONEG opt_bge.h + # wi driver WI_SYMBOL_FIRMWARE opt_wi.h Index: src/sys/modules/bge/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/bge/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- src/sys/modules/bge/Makefile 19 Jan 2003 02:59:33 -0000 1.2 +++ src/sys/modules/bge/Makefile 19 Jun 2005 20:42:02 -0000 @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../dev/bge KMOD= if_bge -SRCS= if_bge.c miibus_if.h miidevs.h opt_bdg.h device_if.h bus_if.h pci_if.h +SRCS= opt_bge.h if_bge.c miibus_if.h miidevs.h opt_bdg.h device_if.h bus_if.h pci_if.h .include