bce(4) with IPMI
YongHyeon PYUN
pyunyh at gmail.com
Mon Oct 10 17:49:39 UTC 2011
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
>
-------------- next part --------------
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;
More information about the freebsd-net
mailing list