Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 2006 10:53:40 +0400
From:      Oleg Bulyzhin <oleg@freebsd.org>
To:        "Brian A. Seklecki" <lavalamp@spiritual-machines.org>
Cc:        netops@collaborativefusion.com, Gleb Smirnoff <glebius@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: Dell PowerEdge 850 bge(4) RELENG_6 (WAS: Re: bge(4) problem)
Message-ID:  <20060818065340.GA42776@lath.rinet.ru>
In-Reply-To: <20060816191152.J69548@arbitor.digitalfreaks.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060818065340.GA42776>