From owner-freebsd-current@FreeBSD.ORG Fri Aug 18 06:53:48 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A08A16A4E6; Fri, 18 Aug 2006 06:53:48 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 806A043D45; Fri, 18 Aug 2006 06:53:47 +0000 (GMT) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (localhost [127.0.0.1]) by lath.rinet.ru (8.13.6/8.13.6) with ESMTP id k7I6rf8g042857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Aug 2006 10:53:41 +0400 (MSD) (envelope-from oleg@lath.rinet.ru) Received: (from oleg@localhost) by lath.rinet.ru (8.13.6/8.13.6/Submit) id k7I6reph042856; Fri, 18 Aug 2006 10:53:40 +0400 (MSD) (envelope-from oleg) Date: Fri, 18 Aug 2006 10:53:40 +0400 From: Oleg Bulyzhin To: "Brian A. Seklecki" Message-ID: <20060818065340.GA42776@lath.rinet.ru> References: <43767.150.101.159.26.1140420612.squirrel@mailbox.TU-Berlin.DE> <20060720104238.L8726@arbitor.digitalfreaks.org> <20060807100622.GY96644@cell.sick.ru> <20060810160126.E55918@arbitor.digitalfreaks.org> <20060816191152.J69548@arbitor.digitalfreaks.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline In-Reply-To: <20060816191152.J69548@arbitor.digitalfreaks.org> User-Agent: Mutt/1.5.11 Cc: netops@collaborativefusion.com, Gleb Smirnoff , freebsd-current@freebsd.org Subject: Re: Dell PowerEdge 850 bge(4) RELENG_6 (WAS: Re: bge(4) problem) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2006 06:53:48 -0000 --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 16, 2006 at 07:17:59PM -0400, Brian A. Seklecki wrote: > On Thu, 10 Aug 2006, Brian A. Seklecki wrote: > > > > >I will experiment with it tomorrow. > > Sorry about the delay. > > The problem persists with a fresh 6.1-STABLE kernel (rev 1.91.2.16 > 2006/08/10). > > When I force the duplex on both sides, I still have to manually bounce the > interface state post-boot. I still get "bge1: 2 link states coalesced". > > It seems to perform well once that happens. > > If I leave it in auto-media, it comes up at 100/half duplex, which leads > to unusable performance. 100/half duplex is technically impossible > anyway. > > I doubt the cause of this problem is the driver at this point. It can't > be the switch. This Broadcom chipset must just suck. > > I will just throw a dual-port em(4) in this machine instead. I will make > sure to let our Dell sales rep know we're not interested in purchasing any > more systems with Broadcom chips onboard. > > The PE 1950/2950 better not have this problem. > > ~BAS > > > > >Meanwhile it should be pointed out that the new Dell 9th generation > >PE{1,2}950 uses the 5708 integrated dual port. > > > >However the Addon-NIC option is still the dual port 5721. > > > >~BAS > > Could you please try attached patch? (can be applied to -current or releng_6). -- Oleg. --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bge_lock_ifmcallbacks.diff" Index: if_bge.c =================================================================== RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v retrieving revision 1.137 diff -u -r1.137 if_bge.c --- if_bge.c 17 Aug 2006 09:53:04 -0000 1.137 +++ if_bge.c 18 Aug 2006 06:41:18 -0000 @@ -3226,17 +3226,19 @@ static int bge_ifmedia_upd(struct ifnet *ifp) { - struct bge_softc *sc; + struct bge_softc *sc = ifp->if_softc; struct mii_data *mii; struct ifmedia *ifm; - sc = ifp->if_softc; + BGE_LOCK(sc); ifm = &sc->bge_ifmedia; /* If this is a 1000baseX NIC, enable the TBI port. */ if (sc->bge_tbi) { - if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) + if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) { + BGE_UNLOCK(sc); return (EINVAL); + } switch(IFM_SUBTYPE(ifm->ifm_media)) { case IFM_AUTO: /* @@ -3268,8 +3270,10 @@ } break; default: + BGE_UNLOCK(sc); return (EINVAL); } + BGE_UNLOCK(sc); return (0); } @@ -3283,6 +3287,7 @@ } mii_mediachg(mii); + BGE_UNLOCK(sc); return (0); } @@ -3292,11 +3297,10 @@ static void bge_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { - struct bge_softc *sc; + struct bge_softc *sc = ifp->if_softc; struct mii_data *mii; - sc = ifp->if_softc; - + BGE_LOCK(sc); if (sc->bge_tbi) { ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -3305,6 +3309,7 @@ ifmr->ifm_status |= IFM_ACTIVE; else { ifmr->ifm_active |= IFM_NONE; + BGE_UNLOCK(sc); return; } ifmr->ifm_active |= IFM_1000_SX; @@ -3312,6 +3317,7 @@ ifmr->ifm_active |= IFM_HDX; else ifmr->ifm_active |= IFM_FDX; + BGE_UNLOCK(sc); return; } @@ -3319,6 +3325,8 @@ mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + + BGE_UNLOCK(sc); } static int --AqsLC8rIMeq19msA--