Index: src/sys/conf/options =================================================================== RCS file: /home/ncvs/src/sys/conf/options,v retrieving revision 1.475.2.11 diff -u -r1.475.2.11 options --- src/sys/conf/options 27 May 2005 14:22:30 -0000 1.475.2.11 +++ src/sys/conf/options 20 Jul 2005 06:03:02 -0000 @@ -620,6 +620,9 @@ # ed driver ED_NO_MIIBUS opt_ed.h +# bge driver +BGE_FAKE_AUTONEG opt_bge.h + # wi driver WI_SYMBOL_FIRMWARE opt_wi.h Index: src/sys/dev/bge/if_bge.c =================================================================== RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v retrieving revision 1.72.2.13 diff -u -r1.72.2.13 if_bge.c --- src/sys/dev/bge/if_bge.c 22 May 2005 03:17:49 -0000 1.72.2.13 +++ src/sys/dev/bge/if_bge.c 20 Jul 2005 06:03:02 -0000 @@ -109,6 +109,8 @@ #include +#include "opt_bge.h" + #define BGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) MODULE_DEPEND(bge, pci, 1, 1, 1); @@ -3444,6 +3446,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/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 20 Jul 2005 06:03: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