kern/118308: 6.2 on IBM Blade HS20, Nortel Switches,
hw.bge.fake_autoneg
Jung-uk Kim
jkim at FreeBSD.org
Mon Jan 21 19:09:11 UTC 2008
On Monday 21 January 2008 09:10 am, Helmut Schneider wrote:
> The following reply was made to PR kern/118308; it has been noted
> by GNATS.
>
> From: "Helmut Schneider" <jumper99 at gmx.de>
> To: <bug-followup at FreeBSD.org>
> Cc:
> Subject: Re: kern/118308: 6.2 on IBM Blade HS20, Nortel Switches,
> hw.bge.fake_autoneg Date: Mon, 21 Jan 2008 15:02:30 +0100
>
> From: "Helmut Schneider" <jumper99 at gmx.de>
>
> > Just as an update, 7.0-RC1 works fine.
>
> ...and, to complete it, 6.3-RELEASE does not work with the "new"
> switches, too, while 7.0-RC1 works on both switches.
Please try the attached patch.
Thanks,
Jung-uk Kim
-------------- next part --------------
--- src/sys/dev/bge/if_bge.c 21 Jan 2008 18:04:41 -0000 1.91.2.24
+++ src/sys/dev/bge/if_bge.c 21 Jan 2008 18:19:54 -0000
@@ -415,15 +415,11 @@
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 = 0;
-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");
@@ -3673,18 +3669,20 @@
* 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:
More information about the freebsd-bugs
mailing list