From owner-freebsd-bugs@FreeBSD.ORG Thu Nov 29 08:04:39 2007 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8EB816A41B for ; Thu, 29 Nov 2007 08:04:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id 72FB413C459 for ; Thu, 29 Nov 2007 08:04:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id lASHWAQm092647; Wed, 28 Nov 2007 12:32:10 -0500 (EST) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-bugs@FreeBSD.org, Helmut Schneider Date: Wed, 28 Nov 2007 12:32:05 -0500 User-Agent: KMail/1.6.2 References: <200711281630.lASGU5Fa092406@freefall.freebsd.org> In-Reply-To: <200711281630.lASGU5Fa092406@freefall.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_YYaTHDUfvwAym2k" Message-Id: <200711281232.08889.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.91.2/4943/Wed Nov 28 11:41:29 2007 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Subject: Re: kern/118308: 6.2 on IBM Blade HS20, Nortel Switches, hw.bge.fake_autoneg X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2007 08:04:39 -0000 --Boundary-00=_YYaTHDUfvwAym2k Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 28 November 2007 11:30 am, Helmut Schneider wrote: > The following reply was made to PR kern/118308; it has been noted > by GNATS. > > From: "Helmut Schneider" > To: "Helmut Schneider" , > > Cc: > Subject: Re: kern/118308: 6.2 on IBM Blade HS20, Nortel Switches, > hw.bge.fake_autoneg Date: Wed, 28 Nov 2007 17:20:56 +0100 > > Sorry, old one I think is that DLink or so (where it works fine), > new switch is the Nortel Networks Layer 2/3 GbE Switch Module... This problem should be fixed already. If you really have to use RELENG_6_2, you can try the attached patch. Jung-uk Kim --Boundary-00=_YYaTHDUfvwAym2k Content-Type: text/plain; charset="iso-8859-1"; name="if_bge.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="if_bge.c.diff" --- sys/dev/bge/if_bge.c.orig 2007-11-28 11:55:47.000000000 -0500 +++ sys/dev/bge/if_bge.c 2007-11-28 11:58:10.000000000 -0500 @@ -397,9 +397,6 @@ 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; -TUNABLE_INT("hw.bge.fake_autoneg", &bge_fake_autoneg); - static uint32_t bge_readmem_ind(struct bge_softc *sc, int off) { @@ -3235,18 +3232,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=_YYaTHDUfvwAym2k--