Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sfxge/common/siena_impl.h
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
/*- | /*- | ||||
* Copyright 2009 Solarflare Communications Inc. All rights reserved. | * Copyright (c) 2009-2015 Solarflare Communications Inc. | ||||
* All rights reserved. | |||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions are met: | ||||
* are met: | |||||
* 1. Redistributions of source code must retain the above copyright | |||||
* notice, this list of conditions and the following disclaimer. | |||||
* 2. Redistributions in binary form must reproduce the above copyright | |||||
* notice, this list of conditions and the following disclaimer in the | |||||
* documentation and/or other materials provided with the distribution. | |||||
* | * | ||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS AND | * 1. Redistributions of source code must retain the above copyright notice, | ||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | * this list of conditions and the following disclaimer. | ||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | * 2. Redistributions in binary form must reproduce the above copyright notice, | ||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | * this list of conditions and the following disclaimer in the documentation | ||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | * and/or other materials provided with the distribution. | ||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |||||
* SUCH DAMAGE. | |||||
* | * | ||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | |||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | |||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | |||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||||
* | |||||
* The views and conclusions contained in the software and documentation are | |||||
* those of the authors and should not be interpreted as representing official | |||||
* policies, either expressed or implied, of the FreeBSD Project. | |||||
* | |||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _SYS_SIENA_IMPL_H | #ifndef _SYS_SIENA_IMPL_H | ||||
#define _SYS_SIENA_IMPL_H | #define _SYS_SIENA_IMPL_H | ||||
#include "efx.h" | #include "efx.h" | ||||
#include "efx_regs.h" | #include "efx_regs.h" | ||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_sram_test( | siena_sram_test( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_sram_pattern_fn_t func); | __in efx_sram_pattern_fn_t func); | ||||
#endif /* EFSYS_OPT_DIAG */ | #endif /* EFSYS_OPT_DIAG */ | ||||
#if EFSYS_OPT_MCDI | |||||
extern __checkReturn int | |||||
siena_mcdi_init( | |||||
__in efx_nic_t *enp, | |||||
__in const efx_mcdi_transport_t *mtp); | |||||
extern void | |||||
siena_mcdi_request_copyin( | |||||
__in efx_nic_t *enp, | |||||
__in efx_mcdi_req_t *emrp, | |||||
__in unsigned int seq, | |||||
__in boolean_t ev_cpl, | |||||
__in boolean_t new_epoch); | |||||
extern __checkReturn boolean_t | |||||
siena_mcdi_request_poll( | |||||
__in efx_nic_t *enp); | |||||
extern void | |||||
siena_mcdi_request_copyout( | |||||
__in efx_nic_t *enp, | |||||
__in efx_mcdi_req_t *emrp); | |||||
extern int | |||||
siena_mcdi_poll_reboot( | |||||
__in efx_nic_t *enp); | |||||
extern void | |||||
siena_mcdi_fini( | |||||
__in efx_nic_t *enp); | |||||
extern __checkReturn int | |||||
siena_mcdi_fw_update_supported( | |||||
__in efx_nic_t *enp, | |||||
__out boolean_t *supportedp); | |||||
extern __checkReturn int | |||||
siena_mcdi_macaddr_change_supported( | |||||
__in efx_nic_t *enp, | |||||
__out boolean_t *supportedp); | |||||
#endif /* EFSYS_OPT_MCDI */ | |||||
#if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD | #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_nvram_partn_size( | siena_nvram_partn_size( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in unsigned int partn, | __in unsigned int partn, | ||||
__out size_t *sizep); | __out size_t *sizep); | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_nvram_size( | siena_nvram_size( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_nvram_type_t type, | __in efx_nvram_type_t type, | ||||
__out size_t *sizep); | __out size_t *sizep); | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_nvram_get_subtype( | |||||
__in efx_nic_t *enp, | |||||
__in unsigned int partn, | |||||
__out uint32_t *subtypep); | |||||
extern __checkReturn int | |||||
siena_nvram_get_version( | siena_nvram_get_version( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_nvram_type_t type, | __in efx_nvram_type_t type, | ||||
__out uint32_t *subtypep, | __out uint32_t *subtypep, | ||||
__out_ecount(4) uint16_t version[4]); | __out_ecount(4) uint16_t version[4]); | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_nvram_rw_start( | siena_nvram_rw_start( | ||||
Show All 26 Lines | |||||
siena_nvram_rw_finish( | siena_nvram_rw_finish( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_nvram_type_t type); | __in efx_nvram_type_t type); | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_nvram_set_version( | siena_nvram_set_version( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_nvram_type_t type, | __in efx_nvram_type_t type, | ||||
__out uint16_t version[4]); | __in_ecount(4) uint16_t version[4]); | ||||
#endif /* EFSYS_OPT_NVRAM */ | #endif /* EFSYS_OPT_NVRAM */ | ||||
#if EFSYS_OPT_VPD | #if EFSYS_OPT_VPD | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_vpd_init( | siena_vpd_init( | ||||
__in efx_nic_t *enp); | __in efx_nic_t *enp); | ||||
▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | siena_phy_stats_update( | ||||
__out_ecount(EFX_PHY_NSTATS) uint32_t *stat); | __out_ecount(EFX_PHY_NSTATS) uint32_t *stat); | ||||
#endif /* EFSYS_OPT_PHY_STATS */ | #endif /* EFSYS_OPT_PHY_STATS */ | ||||
#if EFSYS_OPT_PHY_PROPS | #if EFSYS_OPT_PHY_PROPS | ||||
#if EFSYS_OPT_NAMES | #if EFSYS_OPT_NAMES | ||||
extern const char __cs * | extern const char * | ||||
siena_phy_prop_name( | siena_phy_prop_name( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in unsigned int id); | __in unsigned int id); | ||||
#endif /* EFSYS_OPT_NAMES */ | #endif /* EFSYS_OPT_NAMES */ | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_phy_prop_get( | siena_phy_prop_get( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in unsigned int id, | __in unsigned int id, | ||||
__in uint32_t flags, | __in uint32_t flags, | ||||
__out uint32_t *valp); | __out uint32_t *valp); | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_phy_prop_set( | siena_phy_prop_set( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in unsigned int id, | __in unsigned int id, | ||||
__in uint32_t val); | __in uint32_t val); | ||||
#endif /* EFSYS_OPT_PHY_PROPS */ | #endif /* EFSYS_OPT_PHY_PROPS */ | ||||
#if EFSYS_OPT_PHY_BIST | #if EFSYS_OPT_BIST | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_phy_bist_start( | siena_phy_bist_start( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_phy_bist_type_t type); | __in efx_bist_type_t type); | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_phy_bist_poll( | siena_phy_bist_poll( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_phy_bist_type_t type, | __in efx_bist_type_t type, | ||||
__out efx_phy_bist_result_t *resultp, | __out efx_bist_result_t *resultp, | ||||
__out_opt __drv_when(count > 0, __notnull) | __out_opt __drv_when(count > 0, __notnull) | ||||
uint32_t *value_maskp, | uint32_t *value_maskp, | ||||
__out_ecount_opt(count) __drv_when(count > 0, __notnull) | __out_ecount_opt(count) __drv_when(count > 0, __notnull) | ||||
unsigned long *valuesp, | unsigned long *valuesp, | ||||
__in size_t count); | __in size_t count); | ||||
extern void | extern void | ||||
siena_phy_bist_stop( | siena_phy_bist_stop( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_phy_bist_type_t type); | __in efx_bist_type_t type); | ||||
#endif /* EFSYS_OPT_PHY_BIST */ | #endif /* EFSYS_OPT_BIST */ | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_mac_poll( | siena_mac_poll( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__out efx_link_mode_t *link_modep); | __out efx_link_mode_t *link_modep); | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_mac_up( | siena_mac_up( | ||||
Show All 12 Lines | siena_mac_loopback_set( | ||||
__in efx_link_mode_t link_mode, | __in efx_link_mode_t link_mode, | ||||
__in efx_loopback_type_t loopback_type); | __in efx_loopback_type_t loopback_type); | ||||
#endif /* EFSYS_OPT_LOOPBACK */ | #endif /* EFSYS_OPT_LOOPBACK */ | ||||
#if EFSYS_OPT_MAC_STATS | #if EFSYS_OPT_MAC_STATS | ||||
extern __checkReturn int | extern __checkReturn int | ||||
siena_mac_stats_clear( | |||||
__in efx_nic_t *enp); | |||||
extern __checkReturn int | |||||
siena_mac_stats_upload( | |||||
__in efx_nic_t *enp, | |||||
__in efsys_mem_t *esmp); | |||||
extern __checkReturn int | |||||
siena_mac_stats_periodic( | |||||
__in efx_nic_t *enp, | |||||
__in efsys_mem_t *esmp, | |||||
__in uint16_t period_ms, | |||||
__in boolean_t events); | |||||
extern __checkReturn int | |||||
siena_mac_stats_update( | siena_mac_stats_update( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efsys_mem_t *esmp, | __in efsys_mem_t *esmp, | ||||
__out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, | __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, | ||||
__out_opt uint32_t *generationp); | __out_opt uint32_t *generationp); | ||||
#endif /* EFSYS_OPT_MAC_STATS */ | #endif /* EFSYS_OPT_MAC_STATS */ | ||||
extern __checkReturn int | |||||
siena_mon_reset( | |||||
__in efx_nic_t *enp); | |||||
extern __checkReturn int | |||||
siena_mon_reconfigure( | |||||
__in efx_nic_t *enp); | |||||
#if EFSYS_OPT_MON_STATS | |||||
extern void | |||||
siena_mon_decode_stats( | |||||
__in efx_nic_t *enp, | |||||
__in uint32_t dmask, | |||||
__in_opt efsys_mem_t *esmp, | |||||
__out_opt uint32_t *vmaskp, | |||||
__out_ecount_opt(EFX_MON_NSTATS) efx_mon_stat_value_t *value); | |||||
extern __checkReturn int | |||||
siena_mon_ev( | |||||
__in efx_nic_t *enp, | |||||
__in efx_qword_t *eqp, | |||||
__out efx_mon_stat_t *idp, | |||||
__out efx_mon_stat_value_t *valuep); | |||||
extern __checkReturn int | |||||
siena_mon_stats_update( | |||||
__in efx_nic_t *enp, | |||||
__in efsys_mem_t *esmp, | |||||
__out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); | |||||
#endif /* EFSYS_OPT_MON_STATS */ | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif /* _SYS_SIENA_IMPL_H */ | #endif /* _SYS_SIENA_IMPL_H */ |