Date: Mon, 21 Jan 2008 14:08:58 -0500 From: Jung-uk Kim <jkim@FreeBSD.org> To: "Helmut Schneider" <jumper99@gmx.de> Cc: freebsd-bugs@FreeBSD.org Subject: Re: kern/118308: 6.2 on IBM Blade HS20, Nortel Switches, hw.bge.fake_autoneg Message-ID: <200801211409.01805.jkim@FreeBSD.org> In-Reply-To: <200801211410.m0LEA115064730@freefall.freebsd.org> References: <200801211410.m0LEA115064730@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_N3OlH9FQOryh+Zp Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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@gmx.de> > To: <bug-followup@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@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 --Boundary-00=_N3OlH9FQOryh+Zp Content-Type: text/plain; charset="iso-8859-1"; name="bge.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bge.diff" --- 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: --Boundary-00=_N3OlH9FQOryh+Zp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801211409.01805.jkim>