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 EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT(encp->enc_mon_type != EFX_MON_INVALID);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(encp->enc_mon_type, <, EFX_MON_NTYPES);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore return (__efx_mon_name[encp->enc_mon_type]);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_NAMES */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amorestatic const efx_mon_ops_t __efx_mon_mcdi_ops = {
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore mcdi_mon_stats_update /* emo_stats_update */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_MON_STATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT(encp->enc_mon_type != EFX_MON_INVALID);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* START MKCONFIG GENERATED MonitorStatNamesBlock 31f437eafb0b0437 */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "value_2_5v",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "value_vccp1",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "value_vccp2",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "value_ext_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "value_int_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "value_ain1",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "value_ain2",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_cooling",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "ext_cooling",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "aoe_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "psu_aoe_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "psu_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_temperature2",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vreg_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vreg_0_9v_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vreg_1_2v_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_internal_adc_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_external_adc_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "ambient_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vdd08d_vss08d_csr",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "vdd08d_vss08d_csr_extadc",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "hotpoint_temperature",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "phy_power_switch_port0",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "phy_power_switch_port1",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "0v9_a_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "0v9_b_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "ccom_avreg_1v2_supply",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "ccom_avreg_1v2_supply_ext_adc",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "ccom_avreg_1v8_supply",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "ccom_avreg_1v8_supply_ext_adc",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_master_vptat",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_master_internal_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_master_vptat_ext_adc",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_master_internal_temp_ext_adc",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_slave_vptat",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_slave_internal_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_slave_vptat_ext_adc",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_slave_internal_temp_ext_adc",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "sodimm_vout",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "sodimm_0_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "sodimm_1_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "controller_tdiode_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "board_front_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore "board_back_temp",
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* END MKCONFIG GENERATED MonitorStatNamesBlock */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoreextern const char *
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_NAMES */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MON);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore return (emop->emo_stats_update(enp, esmp, values));
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_MON_STATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);