diff options
author | scottl <scottl@FreeBSD.org> | 2006-09-23 18:55:49 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2006-09-23 18:55:49 +0000 |
commit | fe8ec1f501c15bde3534a7e81c9cd5098a3539c0 (patch) | |
tree | 807730d1c392edcaf96e6d7f6ce91dfe9c31dc27 /sys | |
parent | f58415b4f5d9fbf74188d4258c2a61bba390eaa5 (diff) | |
download | FreeBSD-src-fe8ec1f501c15bde3534a7e81c9cd5098a3539c0.zip FreeBSD-src-fe8ec1f501c15bde3534a7e81c9cd5098a3539c0.tar.gz |
Allow the ASF feature to be disabled via a tunable. On one of my systems,
bringing up the bge interface results in a complete system freeze when
this feature is enabled. Leave it enabled by default.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/bge/if_bge.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 06b1565..ae98e07 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/module.h> #include <sys/socket.h> +#include <sys/sysctl.h> #include <net/if.h> #include <net/if_arp.h> @@ -419,7 +420,16 @@ DRIVER_MODULE(bge, pci, bge_driver, bge_devclass, 0, 0); DRIVER_MODULE(miibus, bge, miibus_driver, miibus_devclass, 0, 0); static int bge_fake_autoneg = 0; +static int bge_allow_asf = 1; + TUNABLE_INT("hw.bge.fake_autoneg", &bge_fake_autoneg); +TUNABLE_INT("hw.bge.allow_asf", &bge_allow_asf); + +SYSCTL_NODE(_hw, OID_AUTO, bge, CTLFLAG_RD, 0, "BGE driver parameters"); +SYSCTL_INT(_hw_bge, OID_AUTO, fake_autoneg, CTLFLAG_RD, &bge_fake_autoneg, 0, + "Enable fake autonegotiation for certain blade systems"); +SYSCTL_INT(_hw_bge, OID_AUTO, allow_asf, CTLFLAG_RD, &bge_allow_asf, 0, + "Allow ASF mode if available"); static uint32_t bge_readmem_ind(struct bge_softc *sc, int off) @@ -2179,8 +2189,8 @@ bge_attach(device_t dev) } sc->bge_asf_mode = 0; - if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG) - == BGE_MAGIC_NUMBER) { + if (bge_allow_asf && (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG) + == BGE_MAGIC_NUMBER)) { if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_NICCFG) & BGE_HWCFG_ASF) { sc->bge_asf_mode |= ASF_ENABLE; |