1*49ef7e06SGarrett D'Amore /* 2*49ef7e06SGarrett D'Amore * Copyright (c) 2009-2015 Solarflare Communications Inc. 3*49ef7e06SGarrett D'Amore * All rights reserved. 4*49ef7e06SGarrett D'Amore * 5*49ef7e06SGarrett D'Amore * Redistribution and use in source and binary forms, with or without 6*49ef7e06SGarrett D'Amore * modification, are permitted provided that the following conditions are met: 7*49ef7e06SGarrett D'Amore * 8*49ef7e06SGarrett D'Amore * 1. Redistributions of source code must retain the above copyright notice, 9*49ef7e06SGarrett D'Amore * this list of conditions and the following disclaimer. 10*49ef7e06SGarrett D'Amore * 2. Redistributions in binary form must reproduce the above copyright notice, 11*49ef7e06SGarrett D'Amore * this list of conditions and the following disclaimer in the documentation 12*49ef7e06SGarrett D'Amore * and/or other materials provided with the distribution. 13*49ef7e06SGarrett D'Amore * 14*49ef7e06SGarrett D'Amore * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15*49ef7e06SGarrett D'Amore * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 16*49ef7e06SGarrett D'Amore * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 17*49ef7e06SGarrett D'Amore * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 18*49ef7e06SGarrett D'Amore * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19*49ef7e06SGarrett D'Amore * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20*49ef7e06SGarrett D'Amore * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21*49ef7e06SGarrett D'Amore * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22*49ef7e06SGarrett D'Amore * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23*49ef7e06SGarrett D'Amore * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24*49ef7e06SGarrett D'Amore * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*49ef7e06SGarrett D'Amore * 26*49ef7e06SGarrett D'Amore * The views and conclusions contained in the software and documentation are 27*49ef7e06SGarrett D'Amore * those of the authors and should not be interpreted as representing official 28*49ef7e06SGarrett D'Amore * policies, either expressed or implied, of the FreeBSD Project. 29*49ef7e06SGarrett D'Amore */ 30*49ef7e06SGarrett D'Amore 31*49ef7e06SGarrett D'Amore #ifndef _SYS_SIENA_IMPL_H 32*49ef7e06SGarrett D'Amore #define _SYS_SIENA_IMPL_H 33*49ef7e06SGarrett D'Amore 34*49ef7e06SGarrett D'Amore #include "efx.h" 35*49ef7e06SGarrett D'Amore #include "efx_regs.h" 36*49ef7e06SGarrett D'Amore #include "efx_mcdi.h" 37*49ef7e06SGarrett D'Amore #include "siena_flash.h" 38*49ef7e06SGarrett D'Amore 39*49ef7e06SGarrett D'Amore #ifdef __cplusplus 40*49ef7e06SGarrett D'Amore extern "C" { 41*49ef7e06SGarrett D'Amore #endif 42*49ef7e06SGarrett D'Amore 43*49ef7e06SGarrett D'Amore #define SIENA_NVRAM_CHUNK 0x80 44*49ef7e06SGarrett D'Amore 45*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 46*49ef7e06SGarrett D'Amore siena_nic_probe( 47*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 48*49ef7e06SGarrett D'Amore 49*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 50*49ef7e06SGarrett D'Amore siena_nic_reset( 51*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 52*49ef7e06SGarrett D'Amore 53*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 54*49ef7e06SGarrett D'Amore siena_nic_init( 55*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 56*49ef7e06SGarrett D'Amore 57*49ef7e06SGarrett D'Amore #if EFSYS_OPT_DIAG 58*49ef7e06SGarrett D'Amore 59*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 60*49ef7e06SGarrett D'Amore siena_nic_register_test( 61*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 62*49ef7e06SGarrett D'Amore 63*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_DIAG */ 64*49ef7e06SGarrett D'Amore 65*49ef7e06SGarrett D'Amore extern void 66*49ef7e06SGarrett D'Amore siena_nic_fini( 67*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 68*49ef7e06SGarrett D'Amore 69*49ef7e06SGarrett D'Amore extern void 70*49ef7e06SGarrett D'Amore siena_nic_unprobe( 71*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 72*49ef7e06SGarrett D'Amore 73*49ef7e06SGarrett D'Amore #define SIENA_SRAM_ROWS 0x12000 74*49ef7e06SGarrett D'Amore 75*49ef7e06SGarrett D'Amore extern void 76*49ef7e06SGarrett D'Amore siena_sram_init( 77*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 78*49ef7e06SGarrett D'Amore 79*49ef7e06SGarrett D'Amore #if EFSYS_OPT_DIAG 80*49ef7e06SGarrett D'Amore 81*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 82*49ef7e06SGarrett D'Amore siena_sram_test( 83*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 84*49ef7e06SGarrett D'Amore __in efx_sram_pattern_fn_t func); 85*49ef7e06SGarrett D'Amore 86*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_DIAG */ 87*49ef7e06SGarrett D'Amore 88*49ef7e06SGarrett D'Amore #if EFSYS_OPT_MCDI 89*49ef7e06SGarrett D'Amore 90*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 91*49ef7e06SGarrett D'Amore siena_mcdi_init( 92*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 93*49ef7e06SGarrett D'Amore __in const efx_mcdi_transport_t *mtp); 94*49ef7e06SGarrett D'Amore 95*49ef7e06SGarrett D'Amore extern void 96*49ef7e06SGarrett D'Amore siena_mcdi_send_request( 97*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 98*49ef7e06SGarrett D'Amore __in void *hdrp, 99*49ef7e06SGarrett D'Amore __in size_t hdr_len, 100*49ef7e06SGarrett D'Amore __in void *sdup, 101*49ef7e06SGarrett D'Amore __in size_t sdu_len); 102*49ef7e06SGarrett D'Amore 103*49ef7e06SGarrett D'Amore extern __checkReturn boolean_t 104*49ef7e06SGarrett D'Amore siena_mcdi_poll_response( 105*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 106*49ef7e06SGarrett D'Amore 107*49ef7e06SGarrett D'Amore extern void 108*49ef7e06SGarrett D'Amore siena_mcdi_read_response( 109*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 110*49ef7e06SGarrett D'Amore __out_bcount(length) void *bufferp, 111*49ef7e06SGarrett D'Amore __in size_t offset, 112*49ef7e06SGarrett D'Amore __in size_t length); 113*49ef7e06SGarrett D'Amore 114*49ef7e06SGarrett D'Amore extern efx_rc_t 115*49ef7e06SGarrett D'Amore siena_mcdi_poll_reboot( 116*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 117*49ef7e06SGarrett D'Amore 118*49ef7e06SGarrett D'Amore extern void 119*49ef7e06SGarrett D'Amore siena_mcdi_fini( 120*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 121*49ef7e06SGarrett D'Amore 122*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 123*49ef7e06SGarrett D'Amore siena_mcdi_feature_supported( 124*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 125*49ef7e06SGarrett D'Amore __in efx_mcdi_feature_id_t id, 126*49ef7e06SGarrett D'Amore __out boolean_t *supportedp); 127*49ef7e06SGarrett D'Amore 128*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_MCDI */ 129*49ef7e06SGarrett D'Amore 130*49ef7e06SGarrett D'Amore #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD 131*49ef7e06SGarrett D'Amore 132*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 133*49ef7e06SGarrett D'Amore siena_nvram_partn_lock( 134*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 135*49ef7e06SGarrett D'Amore __in uint32_t partn); 136*49ef7e06SGarrett D'Amore 137*49ef7e06SGarrett D'Amore extern void 138*49ef7e06SGarrett D'Amore siena_nvram_partn_unlock( 139*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 140*49ef7e06SGarrett D'Amore __in uint32_t partn); 141*49ef7e06SGarrett D'Amore 142*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 143*49ef7e06SGarrett D'Amore siena_nvram_get_dynamic_cfg( 144*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 145*49ef7e06SGarrett D'Amore __in uint32_t partn, 146*49ef7e06SGarrett D'Amore __in boolean_t vpd, 147*49ef7e06SGarrett D'Amore __out siena_mc_dynamic_config_hdr_t **dcfgp, 148*49ef7e06SGarrett D'Amore __out size_t *sizep); 149*49ef7e06SGarrett D'Amore 150*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_VPD || EFSYS_OPT_NVRAM */ 151*49ef7e06SGarrett D'Amore 152*49ef7e06SGarrett D'Amore #if EFSYS_OPT_NVRAM 153*49ef7e06SGarrett D'Amore 154*49ef7e06SGarrett D'Amore #if EFSYS_OPT_DIAG 155*49ef7e06SGarrett D'Amore 156*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 157*49ef7e06SGarrett D'Amore siena_nvram_test( 158*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 159*49ef7e06SGarrett D'Amore 160*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_DIAG */ 161*49ef7e06SGarrett D'Amore 162*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 163*49ef7e06SGarrett D'Amore siena_nvram_get_subtype( 164*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 165*49ef7e06SGarrett D'Amore __in uint32_t partn, 166*49ef7e06SGarrett D'Amore __out uint32_t *subtypep); 167*49ef7e06SGarrett D'Amore 168*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 169*49ef7e06SGarrett D'Amore siena_nvram_type_to_partn( 170*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 171*49ef7e06SGarrett D'Amore __in efx_nvram_type_t type, 172*49ef7e06SGarrett D'Amore __out uint32_t *partnp); 173*49ef7e06SGarrett D'Amore 174*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 175*49ef7e06SGarrett D'Amore siena_nvram_partn_size( 176*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 177*49ef7e06SGarrett D'Amore __in uint32_t partn, 178*49ef7e06SGarrett D'Amore __out size_t *sizep); 179*49ef7e06SGarrett D'Amore 180*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 181*49ef7e06SGarrett D'Amore siena_nvram_partn_rw_start( 182*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 183*49ef7e06SGarrett D'Amore __in uint32_t partn, 184*49ef7e06SGarrett D'Amore __out size_t *chunk_sizep); 185*49ef7e06SGarrett D'Amore 186*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 187*49ef7e06SGarrett D'Amore siena_nvram_partn_read( 188*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 189*49ef7e06SGarrett D'Amore __in uint32_t partn, 190*49ef7e06SGarrett D'Amore __in unsigned int offset, 191*49ef7e06SGarrett D'Amore __out_bcount(size) caddr_t data, 192*49ef7e06SGarrett D'Amore __in size_t size); 193*49ef7e06SGarrett D'Amore 194*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 195*49ef7e06SGarrett D'Amore siena_nvram_partn_erase( 196*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 197*49ef7e06SGarrett D'Amore __in uint32_t partn, 198*49ef7e06SGarrett D'Amore __in unsigned int offset, 199*49ef7e06SGarrett D'Amore __in size_t size); 200*49ef7e06SGarrett D'Amore 201*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 202*49ef7e06SGarrett D'Amore siena_nvram_partn_write( 203*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 204*49ef7e06SGarrett D'Amore __in uint32_t partn, 205*49ef7e06SGarrett D'Amore __in unsigned int offset, 206*49ef7e06SGarrett D'Amore __out_bcount(size) caddr_t data, 207*49ef7e06SGarrett D'Amore __in size_t size); 208*49ef7e06SGarrett D'Amore 209*49ef7e06SGarrett D'Amore extern void 210*49ef7e06SGarrett D'Amore siena_nvram_partn_rw_finish( 211*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 212*49ef7e06SGarrett D'Amore __in uint32_t partn); 213*49ef7e06SGarrett D'Amore 214*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 215*49ef7e06SGarrett D'Amore siena_nvram_partn_get_version( 216*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 217*49ef7e06SGarrett D'Amore __in uint32_t partn, 218*49ef7e06SGarrett D'Amore __out uint32_t *subtypep, 219*49ef7e06SGarrett D'Amore __out_ecount(4) uint16_t version[4]); 220*49ef7e06SGarrett D'Amore 221*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 222*49ef7e06SGarrett D'Amore siena_nvram_partn_set_version( 223*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 224*49ef7e06SGarrett D'Amore __in uint32_t partn, 225*49ef7e06SGarrett D'Amore __in_ecount(4) uint16_t version[4]); 226*49ef7e06SGarrett D'Amore 227*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_NVRAM */ 228*49ef7e06SGarrett D'Amore 229*49ef7e06SGarrett D'Amore #if EFSYS_OPT_VPD 230*49ef7e06SGarrett D'Amore 231*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 232*49ef7e06SGarrett D'Amore siena_vpd_init( 233*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 234*49ef7e06SGarrett D'Amore 235*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 236*49ef7e06SGarrett D'Amore siena_vpd_size( 237*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 238*49ef7e06SGarrett D'Amore __out size_t *sizep); 239*49ef7e06SGarrett D'Amore 240*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 241*49ef7e06SGarrett D'Amore siena_vpd_read( 242*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 243*49ef7e06SGarrett D'Amore __out_bcount(size) caddr_t data, 244*49ef7e06SGarrett D'Amore __in size_t size); 245*49ef7e06SGarrett D'Amore 246*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 247*49ef7e06SGarrett D'Amore siena_vpd_verify( 248*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 249*49ef7e06SGarrett D'Amore __in_bcount(size) caddr_t data, 250*49ef7e06SGarrett D'Amore __in size_t size); 251*49ef7e06SGarrett D'Amore 252*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 253*49ef7e06SGarrett D'Amore siena_vpd_reinit( 254*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 255*49ef7e06SGarrett D'Amore __in_bcount(size) caddr_t data, 256*49ef7e06SGarrett D'Amore __in size_t size); 257*49ef7e06SGarrett D'Amore 258*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 259*49ef7e06SGarrett D'Amore siena_vpd_get( 260*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 261*49ef7e06SGarrett D'Amore __in_bcount(size) caddr_t data, 262*49ef7e06SGarrett D'Amore __in size_t size, 263*49ef7e06SGarrett D'Amore __inout efx_vpd_value_t *evvp); 264*49ef7e06SGarrett D'Amore 265*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 266*49ef7e06SGarrett D'Amore siena_vpd_set( 267*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 268*49ef7e06SGarrett D'Amore __in_bcount(size) caddr_t data, 269*49ef7e06SGarrett D'Amore __in size_t size, 270*49ef7e06SGarrett D'Amore __in efx_vpd_value_t *evvp); 271*49ef7e06SGarrett D'Amore 272*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 273*49ef7e06SGarrett D'Amore siena_vpd_next( 274*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 275*49ef7e06SGarrett D'Amore __in_bcount(size) caddr_t data, 276*49ef7e06SGarrett D'Amore __in size_t size, 277*49ef7e06SGarrett D'Amore __out efx_vpd_value_t *evvp, 278*49ef7e06SGarrett D'Amore __inout unsigned int *contp); 279*49ef7e06SGarrett D'Amore 280*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 281*49ef7e06SGarrett D'Amore siena_vpd_write( 282*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 283*49ef7e06SGarrett D'Amore __in_bcount(size) caddr_t data, 284*49ef7e06SGarrett D'Amore __in size_t size); 285*49ef7e06SGarrett D'Amore 286*49ef7e06SGarrett D'Amore extern void 287*49ef7e06SGarrett D'Amore siena_vpd_fini( 288*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 289*49ef7e06SGarrett D'Amore 290*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_VPD */ 291*49ef7e06SGarrett D'Amore 292*49ef7e06SGarrett D'Amore typedef struct siena_link_state_s { 293*49ef7e06SGarrett D'Amore uint32_t sls_adv_cap_mask; 294*49ef7e06SGarrett D'Amore uint32_t sls_lp_cap_mask; 295*49ef7e06SGarrett D'Amore unsigned int sls_fcntl; 296*49ef7e06SGarrett D'Amore efx_link_mode_t sls_link_mode; 297*49ef7e06SGarrett D'Amore #if EFSYS_OPT_LOOPBACK 298*49ef7e06SGarrett D'Amore efx_loopback_type_t sls_loopback; 299*49ef7e06SGarrett D'Amore #endif 300*49ef7e06SGarrett D'Amore boolean_t sls_mac_up; 301*49ef7e06SGarrett D'Amore } siena_link_state_t; 302*49ef7e06SGarrett D'Amore 303*49ef7e06SGarrett D'Amore extern void 304*49ef7e06SGarrett D'Amore siena_phy_link_ev( 305*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 306*49ef7e06SGarrett D'Amore __in efx_qword_t *eqp, 307*49ef7e06SGarrett D'Amore __out efx_link_mode_t *link_modep); 308*49ef7e06SGarrett D'Amore 309*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 310*49ef7e06SGarrett D'Amore siena_phy_get_link( 311*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 312*49ef7e06SGarrett D'Amore __out siena_link_state_t *slsp); 313*49ef7e06SGarrett D'Amore 314*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 315*49ef7e06SGarrett D'Amore siena_phy_power( 316*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 317*49ef7e06SGarrett D'Amore __in boolean_t on); 318*49ef7e06SGarrett D'Amore 319*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 320*49ef7e06SGarrett D'Amore siena_phy_reconfigure( 321*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 322*49ef7e06SGarrett D'Amore 323*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 324*49ef7e06SGarrett D'Amore siena_phy_verify( 325*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 326*49ef7e06SGarrett D'Amore 327*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 328*49ef7e06SGarrett D'Amore siena_phy_oui_get( 329*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 330*49ef7e06SGarrett D'Amore __out uint32_t *ouip); 331*49ef7e06SGarrett D'Amore 332*49ef7e06SGarrett D'Amore #if EFSYS_OPT_PHY_STATS 333*49ef7e06SGarrett D'Amore 334*49ef7e06SGarrett D'Amore extern void 335*49ef7e06SGarrett D'Amore siena_phy_decode_stats( 336*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 337*49ef7e06SGarrett D'Amore __in uint32_t vmask, 338*49ef7e06SGarrett D'Amore __in_opt efsys_mem_t *esmp, 339*49ef7e06SGarrett D'Amore __out_opt uint64_t *smaskp, 340*49ef7e06SGarrett D'Amore __inout_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat); 341*49ef7e06SGarrett D'Amore 342*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 343*49ef7e06SGarrett D'Amore siena_phy_stats_update( 344*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 345*49ef7e06SGarrett D'Amore __in efsys_mem_t *esmp, 346*49ef7e06SGarrett D'Amore __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); 347*49ef7e06SGarrett D'Amore 348*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_PHY_STATS */ 349*49ef7e06SGarrett D'Amore 350*49ef7e06SGarrett D'Amore #if EFSYS_OPT_BIST 351*49ef7e06SGarrett D'Amore 352*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 353*49ef7e06SGarrett D'Amore siena_phy_bist_start( 354*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 355*49ef7e06SGarrett D'Amore __in efx_bist_type_t type); 356*49ef7e06SGarrett D'Amore 357*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 358*49ef7e06SGarrett D'Amore siena_phy_bist_poll( 359*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 360*49ef7e06SGarrett D'Amore __in efx_bist_type_t type, 361*49ef7e06SGarrett D'Amore __out efx_bist_result_t *resultp, 362*49ef7e06SGarrett D'Amore __out_opt __drv_when(count > 0, __notnull) 363*49ef7e06SGarrett D'Amore uint32_t *value_maskp, 364*49ef7e06SGarrett D'Amore __out_ecount_opt(count) __drv_when(count > 0, __notnull) 365*49ef7e06SGarrett D'Amore unsigned long *valuesp, 366*49ef7e06SGarrett D'Amore __in size_t count); 367*49ef7e06SGarrett D'Amore 368*49ef7e06SGarrett D'Amore extern void 369*49ef7e06SGarrett D'Amore siena_phy_bist_stop( 370*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 371*49ef7e06SGarrett D'Amore __in efx_bist_type_t type); 372*49ef7e06SGarrett D'Amore 373*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_BIST */ 374*49ef7e06SGarrett D'Amore 375*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 376*49ef7e06SGarrett D'Amore siena_mac_poll( 377*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 378*49ef7e06SGarrett D'Amore __out efx_link_mode_t *link_modep); 379*49ef7e06SGarrett D'Amore 380*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 381*49ef7e06SGarrett D'Amore siena_mac_up( 382*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 383*49ef7e06SGarrett D'Amore __out boolean_t *mac_upp); 384*49ef7e06SGarrett D'Amore 385*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 386*49ef7e06SGarrett D'Amore siena_mac_reconfigure( 387*49ef7e06SGarrett D'Amore __in efx_nic_t *enp); 388*49ef7e06SGarrett D'Amore 389*49ef7e06SGarrett D'Amore #if EFSYS_OPT_LOOPBACK 390*49ef7e06SGarrett D'Amore 391*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 392*49ef7e06SGarrett D'Amore siena_mac_loopback_set( 393*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 394*49ef7e06SGarrett D'Amore __in efx_link_mode_t link_mode, 395*49ef7e06SGarrett D'Amore __in efx_loopback_type_t loopback_type); 396*49ef7e06SGarrett D'Amore 397*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_LOOPBACK */ 398*49ef7e06SGarrett D'Amore 399*49ef7e06SGarrett D'Amore #if EFSYS_OPT_MAC_STATS 400*49ef7e06SGarrett D'Amore 401*49ef7e06SGarrett D'Amore extern __checkReturn efx_rc_t 402*49ef7e06SGarrett D'Amore siena_mac_stats_update( 403*49ef7e06SGarrett D'Amore __in efx_nic_t *enp, 404*49ef7e06SGarrett D'Amore __in efsys_mem_t *esmp, 405*49ef7e06SGarrett D'Amore __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, 406*49ef7e06SGarrett D'Amore __inout_opt uint32_t *generationp); 407*49ef7e06SGarrett D'Amore 408*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_MAC_STATS */ 409*49ef7e06SGarrett D'Amore 410*49ef7e06SGarrett D'Amore #ifdef __cplusplus 411*49ef7e06SGarrett D'Amore } 412*49ef7e06SGarrett D'Amore #endif 413*49ef7e06SGarrett D'Amore 414*49ef7e06SGarrett D'Amore #endif /* _SYS_SIENA_IMPL_H */ 415