summaryrefslogtreecommitdiffstats
path: root/sys/mips/cavium/octe
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2011-02-12 02:41:33 +0000
committerjmallett <jmallett@FreeBSD.org>2011-02-12 02:41:33 +0000
commitdc1138bc7d9162cc0a91f58af509dd8d2ddf4b36 (patch)
tree9005f2866f1824724e7475aef92f4286a6889b84 /sys/mips/cavium/octe
parent8f9934fd6be936376bee0f3f643f25b50f285b3c (diff)
downloadFreeBSD-src-dc1138bc7d9162cc0a91f58af509dd8d2ddf4b36.zip
FreeBSD-src-dc1138bc7d9162cc0a91f58af509dd8d2ddf4b36.tar.gz
The Lanner MR-730 uses the first two MACs at its MAC base for the 10/100
management ports, and gigabit ports start at an offset of 2 from the MAC base.
Diffstat (limited to 'sys/mips/cavium/octe')
-rw-r--r--sys/mips/cavium/octe/ethernet-common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/mips/cavium/octe/ethernet-common.c b/sys/mips/cavium/octe/ethernet-common.c
index b107749..415c3d4 100644
--- a/sys/mips/cavium/octe/ethernet-common.c
+++ b/sys/mips/cavium/octe/ethernet-common.c
@@ -279,6 +279,20 @@ int cvm_oct_common_init(struct ifnet *ifp)
octeon_bootinfo->mac_addr_base[5] + count};
cvm_oct_private_t *priv = (cvm_oct_private_t *)ifp->if_softc;
+ switch (cvmx_sysinfo_get()->board_type) {
+#if defined(OCTEON_VENDOR_LANNER)
+ case CVMX_BOARD_TYPE_CUST_LANNER_MR730:
+ /*
+ * The MR-730 uses its first two MACs for the management
+ * ports.
+ */
+ mac[5] += 2;
+ break;
+#endif
+ default:
+ break;
+ }
+
ifp->if_mtu = ETHERMTU;
count++;
OpenPOWER on IntegriCloud