Remove BCM5704S specific tunable (hw.bge.fake_autoneg) and
auto-detect the condition.
This commit is contained in:
parent
33d961a28a
commit
5a606c9586
@ -31,7 +31,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd January 30, 2007
|
||||
.Dd May 22, 2007
|
||||
.Dt BGE 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -205,14 +205,11 @@ SysKonnect SK-9D21 (10/100/1000baseTX)
|
||||
SysKonnect SK-9D41 (1000baseSX)
|
||||
.El
|
||||
.Sh LOADER TUNABLES
|
||||
Tunables can be set at the
|
||||
The following tunable can be set at the
|
||||
.Xr loader 8
|
||||
prompt before booting the kernel, or stored in
|
||||
.Xr loader.conf 5 .
|
||||
.Bl -tag -width indent
|
||||
.It Va hw.bge.fake_autoneg
|
||||
Set to 1 for special handling of the BCM5704 HW.
|
||||
Disabled by default.
|
||||
.It Va hw.bge.allow_asf
|
||||
Allow the ASF feature for cooperating with IPMI.
|
||||
Can cause system lockup problems on a small number of systems.
|
||||
|
@ -424,15 +424,11 @@ static devclass_t bge_devclass;
|
||||
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");
|
||||
|
||||
@ -3724,18 +3720,20 @@ bge_ifmedia_upd_locked(struct ifnet *ifp)
|
||||
* mechanism for programming the autoneg
|
||||
* advertisement registers in TBI mode.
|
||||
*/
|
||||
if (bge_fake_autoneg == 0 &&
|
||||
sc->bge_asicrev == BGE_ASICREV_BCM5704) {
|
||||
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);
|
||||
sgdig = CSR_READ_4(sc, BGE_SGDIG_STS);
|
||||
if (sgdig & BGE_SGDIGSTS_DONE) {
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user