Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2011 10:47:49 -0700
From:      YongHyeon PYUN <pyunyh@gmail.com>
To:        Sean Bruno <seanbru@yahoo-inc.com>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, David Christensen <davidch@broadcom.com>, "davidch@freebsd.org" <davidch@freebsd.org>, Pyun YongHyeon <yongari@freebsd.org>
Subject:   Re: bce(4) with IPMI
Message-ID:  <20111010174749.GA1781@michelle.cdnetworks.com>
In-Reply-To: <1318264942.1236.6.camel@hitfishpass-lx.corp.yahoo.com>
References:  <1317315666.2777.8.camel@hitfishpass-lx.corp.yahoo.com> <1317323418.2777.14.camel@hitfishpass-lx.corp.yahoo.com> <1317343996.2777.33.camel@hitfishpass-lx.corp.yahoo.com> <1317346748.2777.36.camel@hitfishpass-lx.corp.yahoo.com> <5D267A3F22FD854F8F48B3D2B523819385F35B4738@IRVEXCHCCR01.corp.ad.broadcom.com> <1317683178.15510.25.camel@hitfishpass-lx.corp.yahoo.com> <20111007191154.GB11808@michelle.cdnetworks.com> <1318018310.27029.10.camel@hitfishpass-lx.corp.yahoo.com> <20111007205254.GC11808@michelle.cdnetworks.com> <1318264942.1236.6.camel@hitfishpass-lx.corp.yahoo.com>

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

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Oct 10, 2011 at 09:42:22AM -0700, Sean Bruno wrote:
> On Fri, 2011-10-07 at 13:52 -0700, YongHyeon PYUN wrote:
> > 
> > Could you try attached patch? 
> 
> Yeah, this does work on the r410 ... however, I can't test the
> "negative" case here where the bce(4) driver runs across a chipset where
> sc->bce_flags & BCE_MFW_ENABLE_FLAG == 0
> 
> I tried disabling the Dell IPMI controller, but the h/w is still there
> doing "things".  So, this may not be the flag you want to use.
> 

Hmm, then could you try attached patch again?

> Sean
> 

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bce.mfm.diff2"

Index: sys/dev/bce/if_bce.c
===================================================================
--- sys/dev/bce/if_bce.c	(revision 226123)
+++ sys/dev/bce/if_bce.c	(working copy)
@@ -761,7 +761,7 @@ bce_print_adapter_info(struct bce_softc *sc)
 			printf("2.5G"); i++;
 		}
 
-		if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) {
+		if (sc->bce_flags & BCE_MFW_PRESENT_FLAG) {
 			if (i > 0) printf("|");
 			printf("MFW); MFW (%s)\n", sc->bce_mfw_ver);
 		} else {
@@ -1221,7 +1221,7 @@ bce_attach(device_t dev)
 	/* Check if any management firwmare is enabled. */
 	val = bce_shmem_rd(sc, BCE_PORT_FEATURE);
 	if (val & BCE_PORT_FEATURE_ASF_ENABLED) {
-		sc->bce_flags |= BCE_MFW_ENABLE_FLAG;
+		sc->bce_flags |= BCE_MFW_PRESENT_FLAG;
 
 		/* Allow time for firmware to enter the running state. */
 		for (int i = 0; i < 30; i++) {
@@ -1246,6 +1246,7 @@ bce_attach(device_t dev)
 				memcpy(&sc->bce_mfw_ver[i], &val, 4);
 				i += 4;
 			}
+			sc->bce_flags |= BCE_MFW_ENABLE_FLAG;
 		} else {
 			/* May cause firmware synchronization timeouts. */
 			BCE_PRINTF("%s(%d): Management firmware enabled "
@@ -6158,7 +6159,8 @@ bce_ifmedia_sts(struct ifnet *ifp, struct ifmediar
 
 	BCE_LOCK(sc);
 
-	if ((ifp->if_flags & IFF_UP) == 0) {
+	if ((ifp->if_flags & IFF_UP) == 0 &&
+	    (sc->bce_flags & BCE_MFW_PRESENT_FLAG) == 0) {
 		BCE_UNLOCK(sc);
 		return;
 	}
Index: sys/dev/bce/if_bcereg.h
===================================================================
--- sys/dev/bce/if_bcereg.h	(revision 226123)
+++ sys/dev/bce/if_bcereg.h	(working copy)
@@ -6431,11 +6431,12 @@ struct bce_softc
 #define BCE_NO_WOL_FLAG				0x00000008
 #define BCE_USING_DAC_FLAG			0x00000010
 #define BCE_USING_MSI_FLAG 			0x00000020
-#define BCE_MFW_ENABLE_FLAG			0x00000040
-#define BCE_ONE_SHOT_MSI_FLAG			0x00000080
-#define BCE_USING_MSIX_FLAG			0x00000100
-#define BCE_PCIE_FLAG				0x00000200
-#define BCE_USING_TX_FLOW_CONTROL		0x00000400
+#define BCE_MFW_PRESENT_FLAG			0x00000040
+#define BCE_MFW_ENABLE_FLAG			0x00000080
+#define BCE_ONE_SHOT_MSI_FLAG			0x00000100
+#define BCE_USING_MSIX_FLAG			0x00000200
+#define BCE_PCIE_FLAG				0x00000400
+#define BCE_USING_TX_FLOW_CONTROL		0x00000800
 
 	/* Controller capability flags. */
 	u32			bce_cap_flags;

--YiEDa0DAkWCtVeE4--



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