aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bce
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2020-03-01 17:27:30 +0000
committerWarner Losh <imp@FreeBSD.org>2020-03-01 17:27:30 +0000
commit55e306cb128edbffc4150fbf4bd1389c30b13daa (patch)
treeb9791111f869d296c05bbffb26f5708d52221ad8 /sys/dev/bce
parent246da17ee58296246482fb87c3b0cb05513bda0e (diff)
Notes
Diffstat (limited to 'sys/dev/bce')
-rw-r--r--sys/dev/bce/if_bce.c16
-rw-r--r--sys/dev/bce/if_bcereg.h34
2 files changed, 0 insertions, 50 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index 24255770a6182..7a9f8b97ddd16 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -1407,14 +1407,8 @@ bce_attach(device_t dev)
ifp->if_capabilities = BCE_IF_CAPABILITIES;
}
-#if __FreeBSD_version >= 800505
- /*
- * Introducing IFCAP_LINKSTATE didn't bump __FreeBSD_version
- * so it's approximate value.
- */
if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0)
ifp->if_capabilities |= IFCAP_LINKSTATE;
-#endif
ifp->if_capenable = ifp->if_capabilities;
@@ -1490,13 +1484,8 @@ bce_attach(device_t dev)
/* Attach to the Ethernet interface list. */
ether_ifattach(ifp, sc->eaddr);
-#if __FreeBSD_version < 500000
- callout_init(&sc->bce_tick_callout);
- callout_init(&sc->bce_pulse_callout);
-#else
callout_init_mtx(&sc->bce_tick_callout, &sc->bce_mtx, 0);
callout_init_mtx(&sc->bce_pulse_callout, &sc->bce_mtx, 0);
-#endif
/* Hookup IRQ last. */
rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE,
@@ -6801,14 +6790,9 @@ bce_rx_intr(struct bce_softc *sc)
DBRUN(sc->vlan_tagged_frames_rcvd++);
if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) {
DBRUN(sc->vlan_tagged_frames_stripped++);
-#if __FreeBSD_version < 700000
- VLAN_INPUT_TAG(ifp, m0,
- l2fhdr->l2_fhdr_vlan_tag, continue);
-#else
m0->m_pkthdr.ether_vtag =
l2fhdr->l2_fhdr_vlan_tag;
m0->m_flags |= M_VLANTAG;
-#endif
} else {
/*
* bce(4) controllers can't disable VLAN
diff --git a/sys/dev/bce/if_bcereg.h b/sys/dev/bce/if_bcereg.h
index d9bd23ccfd165..ad2db2666ba38 100644
--- a/sys/dev/bce/if_bcereg.h
+++ b/sys/dev/bce/if_bcereg.h
@@ -490,18 +490,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, \
#endif /* BCE_DEBUG */
-#if __FreeBSD_version < 800054
-#if defined(__i386__) || defined(__amd64__)
-#define mb() __asm volatile("mfence" ::: "memory")
-#define wmb() __asm volatile("sfence" ::: "memory")
-#define rmb() __asm volatile("lfence" ::: "memory")
-#else
-#define mb()
-#define rmb()
-#define wmb()
-#endif
-#endif
-
/****************************************************************************/
/* Device identification definitions. */
/****************************************************************************/
@@ -577,7 +565,6 @@ struct bce_type {
/****************************************************************************/
/* Byte order conversions. */
/****************************************************************************/
-#if __FreeBSD_version >= 500000
#define bce_htobe16(x) htobe16(x)
#define bce_htobe32(x) htobe32(x)
#define bce_htobe64(x) htobe64(x)
@@ -591,22 +578,6 @@ struct bce_type {
#define bce_le16toh(x) le16toh(x)
#define bce_le32toh(x) le32toh(x)
#define bce_le64toh(x) le64toh(x)
-#else
-#define bce_htobe16(x) (x)
-#define bce_htobe32(x) (x)
-#define bce_htobe64(x) (x)
-#define bce_htole16(x) (x)
-#define bce_htole32(x) (x)
-#define bce_htole64(x) (x)
-
-#define bce_be16toh(x) (x)
-#define bce_be32toh(x) (x)
-#define bce_be64toh(x) (x)
-#define bce_le16toh(x) (x)
-#define bce_le32toh(x) (x)
-#define bce_le64toh(x) (x)
-#endif
-
/****************************************************************************/
/* NVRAM Access */
@@ -6336,14 +6307,9 @@ struct fw_info {
#define BCE_IF_HWASSIST (CSUM_TCP | CSUM_UDP)
#endif
-#if __FreeBSD_version < 700000
-#define BCE_IF_CAPABILITIES (IFCAP_VLAN_MTU | \
- IFCAP_VLAN_HWTAGGING | IFCAP_HWCSUM | IFCAP_JUMBO_MTU)
-#else
#define BCE_IF_CAPABILITIES (IFCAP_VLAN_MTU | \
IFCAP_VLAN_HWTAGGING | IFCAP_HWCSUM | \
IFCAP_JUMBO_MTU | IFCAP_VLAN_HWCSUM)
-#endif
#define BCE_MIN_MTU 60
#define BCE_MIN_ETHER_MTU 64