49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Copyright (c) 2007-2015 Solarflare Communications Inc.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * All rights reserved.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Redistribution and use in source and binary forms, with or without
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * modification, are permitted provided that the following conditions are met:
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * 1. Redistributions of source code must retain the above copyright notice,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * this list of conditions and the following disclaimer.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * 2. Redistributions in binary form must reproduce the above copyright notice,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * this list of conditions and the following disclaimer in the documentation
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * and/or other materials provided with the distribution.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * The views and conclusions contained in the software and documentation are
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * those of the authors and should not be interpreted as representing official
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * policies, either expressed or implied, of the FreeBSD Project.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_SIENA */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amorestatic const efx_mac_ops_t __efx_siena_mac_ops = {
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore siena_mac_reconfigure, /* emo_reconfigure */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore siena_mac_multicast_list_set, /* emo_multicast_list_set */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore siena_mac_loopback_set, /* emo_loopback_set */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_LOOPBACK */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore efx_mcdi_mac_stats_upload, /* emo_stats_upload */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore efx_mcdi_mac_stats_periodic, /* emo_stats_periodic */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore siena_mac_stats_update /* emo_stats_update */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_MAC_STATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_SIENA */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amorestatic const efx_mac_ops_t __efx_ef10_mac_ops = {
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore ef10_mac_multicast_list_set, /* emo_multicast_list_set */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore ef10_mac_filter_default_rxq_set, /* emo_filter_default_rxq_set */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore /* emo_filter_default_rxq_clear */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore ef10_mac_loopback_set, /* emo_loopback_set */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_LOOPBACK */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore efx_mcdi_mac_stats_upload, /* emo_stats_upload */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore efx_mcdi_mac_stats_periodic, /* emo_stats_periodic */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore ef10_mac_stats_update /* emo_stats_update */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_MAC_STATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore oui = addr[0] << 16 | addr[1] << 8 | addr[2];
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFX_MAC_ADDR_COPY(old_addr, epp->ep_mac_addr);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFX_MAC_ADDR_COPY(epp->ep_mac_addr, old_addr);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if ((fcntl & ~(EFX_FCNTL_RESPOND | EFX_FCNTL_GENERATE)) != 0) {
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Ignore a request to set flow control auto-negotiation
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * if the PHY doesn't support it.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if (~epp->ep_phy_cap_mask & (1 << EFX_PHY_CAP_AN))
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Always encode the flow control settings in the advertised
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * capabilities even if we are not trying to auto-negotiate
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * them and reconfigure both the PHY and the MAC.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore epp->ep_adv_cap_mask |= (1 << EFX_PHY_CAP_PAUSE |
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore epp->ep_adv_cap_mask &= ~(1 << EFX_PHY_CAP_PAUSE |
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore epp->ep_adv_cap_mask ^= (1 << EFX_PHY_CAP_ASYM);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Decode the requested flow control settings from the PHY
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * advertised capabilities.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if (epp->ep_adv_cap_mask & (1 << EFX_PHY_CAP_PAUSE))
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore wanted = EFX_FCNTL_RESPOND | EFX_FCNTL_GENERATE;
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if (epp->ep_adv_cap_mask & (1 << EFX_PHY_CAP_ASYM))
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore old_mulcst_addr_count = epp->ep_mulcst_addr_count;
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore /* Allocate memory to store old list (instead of using stack) */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore /* Save the old list in case we need to rollback */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore (void) memcpy(old_mulcst_addr_list, epp->ep_mulcst_addr_list,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore /* Store the new list */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore (void) memcpy(epp->ep_mulcst_addr_list, addrs,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if ((rc = emop->emo_multicast_list_set(enp)) != 0)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore /* Restore original list on failure */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore epp->ep_mulcst_addr_count = old_mulcst_addr_count;
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore (void) memcpy(epp->ep_mulcst_addr_list, old_mulcst_addr_list,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if (emop->emo_filter_default_rxq_set != NULL) {
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore rc = emop->emo_filter_default_rxq_set(enp, erp, using_rss);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if (emop->emo_filter_default_rxq_clear != NULL)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* START MKCONFIG GENERATED EfxMacStatNamesBlock 054d43a31d2d7a45 */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_unicst_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_multicst_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_brdcst_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_pause_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_le_64_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_65_to_127_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_128_to_255_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_256_to_511_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_512_to_1023_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_1024_to_15xx_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_ge_15xx_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_fcs_errors",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_drop_events",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_false_carrier_errors",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_symbol_errors",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_align_errors",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_internal_errors",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_jabber_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_lane0_char_err",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_lane1_char_err",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_lane2_char_err",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_lane3_char_err",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_lane0_disp_err",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_lane1_disp_err",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_lane2_disp_err",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_lane3_disp_err",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_match_fault",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rx_nodesc_drop_cnt",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_unicst_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_multicst_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_brdcst_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_pause_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_le_64_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_65_to_127_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_128_to_255_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_256_to_511_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_512_to_1023_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_1024_to_15xx_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_ge_15xx_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_sgl_col_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_mult_col_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_ex_col_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_late_col_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_def_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "tx_ex_def_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "pm_trunc_bb_overflow",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "pm_discard_bb_overflow",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "pm_trunc_vfifo_full",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "pm_discard_vfifo_full",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "pm_trunc_qbb",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "pm_discard_qbb",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "pm_discard_mapping",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rxdp_q_disabled_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rxdp_di_dropped_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rxdp_streaming_pkts",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rxdp_hlb_fetch",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "rxdp_hlb_wait",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_unicast_packets",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_unicast_bytes",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_multicast_packets",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_multicast_bytes",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_broadcast_packets",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_broadcast_bytes",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_bad_packets",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_bad_bytes",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_rx_overflow",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_unicast_packets",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_unicast_bytes",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_multicast_packets",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_multicast_bytes",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_broadcast_packets",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_broadcast_bytes",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_bad_packets",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_bad_bytes",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vadapter_tx_overflow",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* END MKCONFIG GENERATED EfxMacStatNamesBlock */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_NAMES */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Don't assert !ep_mac_stats_pending, because the client might
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * have failed to finalise statistics when previously stopping
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if ((rc = emop->emo_stats_upload(enp, esmp)) != 0)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore if ((rc = emop->emo_stats_periodic(enp, esmp, period_ms, events)) != 0)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *essp,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore rc = emop->emo_stats_update(enp, esmp, essp, generationp);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_MAC_STATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_SIENA */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_HUNTINGTON */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_MEDFORD */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* Compute the multicast hash as used on Falcon and Siena. */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore for (i = 0; i < count; i++) {
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore /* Calculate hash bucket (IEEE 802.3 CRC32 of the MAC addr) */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore crc = efx_crc32_calculate(0xffffffff, addrs, EFX_MAC_ADDR_LEN);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore (void) memcpy(old_hash, epp->ep_multicst_hash, sizeof (old_hash));
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore (void) memcpy(epp->ep_multicst_hash, old_hash, sizeof (old_hash));
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_SIENA */