summaryrefslogtreecommitdiffstats
path: root/sys/dev/sfxge/common/efx_mac.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-25 08:56:15 -0200
committerRenato Botelho <renato@netgate.com>2016-01-25 08:56:15 -0200
commiteb84e0723f3b4bc5e40024f66fe21c14b09e9ec4 (patch)
treefec6b99d018e13f1fccbe31478aaf29a28a55642 /sys/dev/sfxge/common/efx_mac.c
parentc50df8e1b90c4f9b8bbffa592477c129854776ce (diff)
parent94b1bbbd44bd88b6db1c00d795cdf7675b3ae254 (diff)
downloadFreeBSD-src-eb84e0723f3b4bc5e40024f66fe21c14b09e9ec4.zip
FreeBSD-src-eb84e0723f3b4bc5e40024f66fe21c14b09e9ec4.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/dev/sfxge/common/efx_mac.c')
-rw-r--r--sys/dev/sfxge/common/efx_mac.c51
1 files changed, 34 insertions, 17 deletions
diff --git a/sys/dev/sfxge/common/efx_mac.c b/sys/dev/sfxge/common/efx_mac.c
index c8794a6..4868c4b 100644
--- a/sys/dev/sfxge/common/efx_mac.c
+++ b/sys/dev/sfxge/common/efx_mac.c
@@ -56,6 +56,7 @@ static efx_mac_ops_t __efx_falcon_gmac_ops = {
falcon_mac_poll, /* emo_poll */
falcon_mac_up, /* emo_up */
falcon_gmac_reconfigure, /* emo_addr_set */
+ falcon_gmac_reconfigure, /* emo_pdu_set */
falcon_gmac_reconfigure, /* emo_reconfigure */
falconsiena_mac_multicast_list_set, /* emo_multicast_list_set */
NULL, /* emo_filter_set_default_rxq */
@@ -77,6 +78,7 @@ static efx_mac_ops_t __efx_falcon_xmac_ops = {
falcon_mac_poll, /* emo_poll */
falcon_mac_up, /* emo_up */
falcon_xmac_reconfigure, /* emo_addr_set */
+ falcon_xmac_reconfigure, /* emo_pdu_set */
falcon_xmac_reconfigure, /* emo_reconfigure */
falconsiena_mac_multicast_list_set, /* emo_multicast_list_set */
NULL, /* emo_filter_set_default_rxq */
@@ -98,6 +100,7 @@ static efx_mac_ops_t __efx_siena_mac_ops = {
siena_mac_poll, /* emo_poll */
siena_mac_up, /* emo_up */
siena_mac_reconfigure, /* emo_addr_set */
+ siena_mac_reconfigure, /* emo_pdu_set */
siena_mac_reconfigure, /* emo_reconfigure */
falconsiena_mac_multicast_list_set, /* emo_multicast_list_set */
NULL, /* emo_filter_set_default_rxq */
@@ -113,27 +116,28 @@ static efx_mac_ops_t __efx_siena_mac_ops = {
};
#endif /* EFSYS_OPT_SIENA */
-#if EFSYS_OPT_HUNTINGTON
-static efx_mac_ops_t __efx_hunt_mac_ops = {
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_mac_ops_t __efx_ef10_mac_ops = {
NULL, /* emo_reset */
- hunt_mac_poll, /* emo_poll */
- hunt_mac_up, /* emo_up */
- hunt_mac_addr_set, /* emo_addr_set */
- hunt_mac_reconfigure, /* emo_reconfigure */
- hunt_mac_multicast_list_set, /* emo_multicast_list_set */
- hunt_mac_filter_default_rxq_set, /* emo_filter_default_rxq_set */
- hunt_mac_filter_default_rxq_clear,
+ ef10_mac_poll, /* emo_poll */
+ ef10_mac_up, /* emo_up */
+ ef10_mac_addr_set, /* emo_addr_set */
+ ef10_mac_pdu_set, /* emo_pdu_set */
+ ef10_mac_reconfigure, /* emo_reconfigure */
+ ef10_mac_multicast_list_set, /* emo_multicast_list_set */
+ ef10_mac_filter_default_rxq_set, /* emo_filter_default_rxq_set */
+ ef10_mac_filter_default_rxq_clear,
/* emo_filter_default_rxq_clear */
#if EFSYS_OPT_LOOPBACK
- hunt_mac_loopback_set, /* emo_loopback_set */
+ ef10_mac_loopback_set, /* emo_loopback_set */
#endif /* EFSYS_OPT_LOOPBACK */
#if EFSYS_OPT_MAC_STATS
efx_mcdi_mac_stats_upload, /* emo_stats_upload */
efx_mcdi_mac_stats_periodic, /* emo_stats_periodic */
- hunt_mac_stats_update /* emo_stats_update */
+ ef10_mac_stats_update /* emo_stats_update */
#endif /* EFSYS_OPT_MAC_STATS */
};
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
static efx_mac_ops_t *__efx_mac_ops[] = {
/* [EFX_MAC_INVALID] */
@@ -158,7 +162,13 @@ static efx_mac_ops_t *__efx_mac_ops[] = {
#endif
/* [EFX_MAC_HUNTINGTON] */
#if EFSYS_OPT_HUNTINGTON
- &__efx_hunt_mac_ops,
+ &__efx_ef10_mac_ops,
+#else
+ NULL,
+#endif
+ /* [EFX_MAC_MEDFORD] */
+#if EFSYS_OPT_MEDFORD
+ &__efx_ef10_mac_ops,
#else
NULL,
#endif
@@ -190,7 +200,7 @@ efx_mac_pdu_set(
old_pdu = epp->ep_mac_pdu;
epp->ep_mac_pdu = (uint32_t)pdu;
- if ((rc = emop->emo_reconfigure(enp)) != 0)
+ if ((rc = emop->emo_pdu_set(enp)) != 0)
goto fail3;
return (0);
@@ -781,6 +791,13 @@ efx_mac_select(
efx_mac_ops_t *emop;
int rc = EINVAL;
+#if EFSYS_OPT_SIENA
+ if (enp->en_family == EFX_FAMILY_SIENA) {
+ type = EFX_MAC_SIENA;
+ goto chosen;
+ }
+#endif
+
#if EFSYS_OPT_HUNTINGTON
if (enp->en_family == EFX_FAMILY_HUNTINGTON) {
type = EFX_MAC_HUNTINGTON;
@@ -788,9 +805,9 @@ efx_mac_select(
}
#endif
-#if EFSYS_OPT_SIENA
- if (enp->en_family == EFX_FAMILY_SIENA) {
- type = EFX_MAC_SIENA;
+#if EFSYS_OPT_MEDFORD
+ if (enp->en_family == EFX_FAMILY_MEDFORD) {
+ type = EFX_MAC_MEDFORD;
goto chosen;
}
#endif
OpenPOWER on IntegriCloud