diff options
43 files changed, 1491 insertions, 1476 deletions
diff --git a/sys/dev/sfxge/common/efsys.h b/sys/dev/sfxge/common/efsys.h index 0a7b1ad6cd3f..0bab07617e07 100644 --- a/sys/dev/sfxge/common/efsys.h +++ b/sys/dev/sfxge/common/efsys.h @@ -225,6 +225,7 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, bus_dmamap_t map, #define __deref_out_bcount_opt(n) #define __checkReturn +#define __success(_x) #define __drv_when(_p, _c) diff --git a/sys/dev/sfxge/common/efx.h b/sys/dev/sfxge/common/efx.h index b4ef267af870..885d8c4d7639 100644 --- a/sys/dev/sfxge/common/efx.h +++ b/sys/dev/sfxge/common/efx.h @@ -40,11 +40,21 @@ extern "C" { #endif -#define EFX_STATIC_ASSERT(_cond) ((void)sizeof(char[(_cond) ? 1 : -1])) +#define EFX_STATIC_ASSERT(_cond) \ + ((void)sizeof(char[(_cond) ? 1 : -1])) -#define EFX_ARRAY_SIZE(_array) (sizeof(_array) / sizeof((_array)[0])) +#define EFX_ARRAY_SIZE(_array) \ + (sizeof(_array) / sizeof((_array)[0])) -#define EFX_FIELD_OFFSET(_type, _field) ((size_t) &(((_type *)0)->_field)) +#define EFX_FIELD_OFFSET(_type, _field) \ + ((size_t) &(((_type *)0)->_field)) + +/* Return codes */ + +typedef __success(return == 0) int efx_rc_t; + + +/* Chip families */ typedef enum efx_family_e { EFX_FAMILY_INVALID, @@ -54,13 +64,13 @@ typedef enum efx_family_e { EFX_FAMILY_NTYPES } efx_family_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_family( __in uint16_t venid, __in uint16_t devid, __out efx_family_t *efp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_infer_family( __in efsys_bar_t *esbp, __out efx_family_t *efp); @@ -124,7 +134,7 @@ typedef struct efx_nic_s efx_nic_t; #define EFX_NIC_FUNC_TRUSTED 0x00000004 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_create( __in efx_family_t family, __in efsys_identifier_t *esip, @@ -132,34 +142,34 @@ efx_nic_create( __in efsys_lock_t *eslp, __deref_out efx_nic_t **enpp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_probe( __in efx_nic_t *enp); #if EFSYS_OPT_PCIE_TUNE -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_pcie_tune( __in efx_nic_t *enp, unsigned int nlanes); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_pcie_extended_sync( __in efx_nic_t *enp); #endif /* EFSYS_OPT_PCIE_TUNE */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_init( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_reset( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_register_test( __in efx_nic_t *enp); @@ -199,12 +209,12 @@ typedef struct efx_mcdi_transport_s { void (*emt_exception)(void *, efx_mcdi_exception_t); } efx_mcdi_transport_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_reboot( __in efx_nic_t *enp); @@ -246,7 +256,7 @@ typedef enum efx_intr_type_e { #define EFX_INTR_SIZE (sizeof (efx_oword_t)) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, @@ -266,7 +276,7 @@ efx_intr_disable_unlocked( #define EFX_INTR_NEVQS 32 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_intr_trigger( __in efx_nic_t *enp, __in unsigned int level); @@ -418,17 +428,17 @@ typedef enum efx_link_mode_e { #define EFX_MAC_PDU_MIN 60 #define EFX_MAC_PDU_MAX EFX_MAC_PDU(EFX_MAC_SDU_MAX) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_pdu_set( __in efx_nic_t *enp, __in size_t pdu); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_addr_set( __in efx_nic_t *enp, __in uint8_t *addr); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_filter_set( __in efx_nic_t *enp, __in boolean_t all_unicst, @@ -436,13 +446,13 @@ efx_mac_filter_set( __in boolean_t all_mulcst, __in boolean_t brdcst); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_multicast_list_set( __in efx_nic_t *enp, __in_ecount(6*count) uint8_t const *addrs, __in int count); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_filter_default_rxq_set( __in efx_nic_t *enp, __in efx_rxq_t *erp, @@ -452,12 +462,12 @@ extern void efx_mac_filter_default_rxq_clear( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_drain( __in efx_nic_t *enp, __in boolean_t enabled); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp); @@ -465,7 +475,7 @@ efx_mac_up( #define EFX_FCNTL_RESPOND 0x00000001 #define EFX_FCNTL_GENERATE 0x00000002 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_fcntl_set( __in efx_nic_t *enp, __in unsigned int fcntl, @@ -479,7 +489,7 @@ efx_mac_fcntl_get( #define EFX_MAC_HASH_BITS (1 << 8) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_pktfilter_init( __in efx_nic_t *enp); @@ -487,26 +497,26 @@ extern void efx_pktfilter_fini( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_pktfilter_set( __in efx_nic_t *enp, __in boolean_t unicst, __in boolean_t brdcst); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_hash_set( __in efx_nic_t *enp, __in_ecount(EFX_MAC_HASH_BITS) unsigned int const *bucket); #if EFSYS_OPT_MCAST_FILTER_LIST -extern __checkReturn int +extern __checkReturn efx_rc_t efx_pktfilter_mcast_list_set( __in efx_nic_t *enp, __in uint8_t const *addrs, __in int count); #endif /* EFSYS_OPT_MCAST_FILTER_LIST */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_pktfilter_mcast_all( __in efx_nic_t *enp); @@ -536,19 +546,19 @@ efx_mac_stat_name( * Thus, drivers should zero this buffer before use, so that not-understood * statistics read back as zero. */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_stats_upload( __in efx_nic_t *enp, __in efsys_mem_t *esmp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_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 +extern __checkReturn efx_rc_t efx_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -577,7 +587,7 @@ efx_mon_name( #endif /* EFSYS_OPT_NAMES */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mon_init( __in efx_nic_t *enp); @@ -684,7 +694,7 @@ efx_mon_stat_name( #endif /* EFSYS_OPT_NAMES */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -707,7 +717,7 @@ efx_mon_fini( #define MAXMMD ((1 << 5) - 1) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_verify( __in efx_nic_t *enp); @@ -721,14 +731,14 @@ typedef enum efx_phy_led_mode_e { EFX_PHY_LED_NMODES } efx_phy_led_mode_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_led_set( __in efx_nic_t *enp, __in efx_phy_led_mode_t mode); #endif /* EFSYS_OPT_PHY_LED_CONTROL */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_port_init( __in efx_nic_t *enp); @@ -786,7 +796,7 @@ efx_loopback_mask( __in efx_loopback_kind_t loopback_kind, __out efx_qword_t *maskp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_port_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, @@ -803,7 +813,7 @@ efx_loopback_type_name( #endif /* EFSYS_OPT_LOOPBACK */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_port_poll( __in efx_nic_t *enp, __out_opt efx_link_mode_t *link_modep); @@ -839,7 +849,7 @@ efx_phy_adv_cap_get( __in uint32_t flag, __out uint32_t *maskp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_adv_cap_set( __in efx_nic_t *enp, __in uint32_t mask); @@ -849,7 +859,7 @@ efx_phy_lp_cap_get( __in efx_nic_t *enp, __out uint32_t *maskp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip); @@ -942,7 +952,7 @@ efx_phy_stat_name( #define EFX_PHY_STATS_SIZE 0x100 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -963,14 +973,14 @@ efx_phy_prop_name( #define EFX_PHY_PROP_DEFAULT 0x00000001 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t flags, __out uint32_t *valp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, @@ -1030,16 +1040,16 @@ typedef enum efx_bist_value_e { EFX_BIST_NVALUES, } efx_bist_value_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_bist_enable_offline( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, @@ -1184,7 +1194,7 @@ typedef struct efx_drv_limits_s uint32_t edl_max_pio_alloc_count; } efx_drv_limits_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_set_drv_limits( __inout efx_nic_t *enp, __in efx_drv_limits_t *edlp); @@ -1194,14 +1204,14 @@ typedef enum efx_nic_region_e { EFX_REGION_PIO_WRITE_VI, /* Memory BAR WC mapping */ } efx_nic_region_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_get_bar_region( __in efx_nic_t *enp, __in efx_nic_region_t region, __out uint32_t *offsetp, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_get_vi_pool( __in efx_nic_t *enp, __out uint32_t *evq_countp, @@ -1230,48 +1240,48 @@ typedef struct efx_vpd_value_s { #define EFX_VPD_KEYWORD(x, y) ((x) | ((y) << 8)) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_init( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_size( __in efx_nic_t *enp, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __inout efx_vpd_value_t *evvp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_set( __in efx_nic_t *enp, __inout_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_next( __in efx_nic_t *enp, __inout_bcount(size) caddr_t data, @@ -1279,7 +1289,7 @@ efx_vpd_next( __out efx_vpd_value_t *evvp, __inout unsigned int *contp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -1311,25 +1321,25 @@ typedef enum efx_nvram_type_e { EFX_NVRAM_NTYPES, } efx_nvram_type_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_init( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1340,14 +1350,14 @@ efx_nvram_rw_finish( __in efx_nic_t *enp, __in efx_nvram_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4]); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1355,26 +1365,26 @@ efx_nvram_read_chunk( __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in_ecount(4) uint16_t version[4]); /* Validate contents of TLV formatted partition */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_tlv_validate( __in efx_nic_t *enp, __in uint32_t partn, __in_bcount(partn_size) caddr_t partn_data, __in size_t partn_size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1390,13 +1400,13 @@ efx_nvram_fini( #if EFSYS_OPT_BOOTCFG -extern int +extern efx_rc_t efx_bootcfg_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); -extern int +extern efx_rc_t efx_bootcfg_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -1446,34 +1456,34 @@ typedef union efx_lightsout_offload_param_u { } elop_ns; } efx_lightsout_offload_param_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_wol_init( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_wol_filter_clear( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_wol_filter_add( __in efx_nic_t *enp, __in efx_wol_type_t type, __in efx_wol_param_t *paramp, __out uint32_t *filter_idp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_wol_filter_remove( __in efx_nic_t *enp, __in uint32_t filter_id); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_lightsout_offload_add( __in efx_nic_t *enp, __in efx_lightsout_offload_type_t type, __in efx_lightsout_offload_param_t *paramp, __out uint32_t *filter_idp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_lightsout_offload_remove( __in efx_nic_t *enp, __in efx_lightsout_offload_type_t type, @@ -1503,14 +1513,14 @@ typedef void __in boolean_t negate, __out efx_qword_t *eqp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_sram_test( __in efx_nic_t *enp, __in efx_pattern_type_t type); #endif /* EFSYS_OPT_DIAG */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_sram_buf_tbl_set( __in efx_nic_t *enp, __in uint32_t id, @@ -1579,7 +1589,7 @@ typedef enum efx_ev_qstat_e { #endif /* EFSYS_OPT_QSTATS */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_ev_init( __in efx_nic_t *enp); @@ -1593,7 +1603,7 @@ efx_ev_fini( #define EFX_EVQ_SIZE(_nevs) ((_nevs) * sizeof (efx_qword_t)) #define EFX_EVQ_NBUFS(_nevs) (EFX_EVQ_SIZE(_nevs) / EFX_BUF_SIZE) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -1768,12 +1778,12 @@ efx_ev_qpoll( __in const efx_ev_callbacks_t *eecp, __in_opt void *arg); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_ev_qprime( __in efx_evq_t *eep, __in unsigned int count); @@ -1802,7 +1812,7 @@ efx_ev_qdestroy( /* RX */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_init( __inout efx_nic_t *enp); @@ -1811,7 +1821,7 @@ efx_rx_fini( __in efx_nic_t *enp); #if EFSYS_OPT_RX_HDR_SPLIT - __checkReturn int + __checkReturn efx_rc_t efx_rx_hdr_split_enable( __in efx_nic_t *enp, __in unsigned int hdr_buf_size, @@ -1820,7 +1830,7 @@ efx_rx_hdr_split_enable( #endif /* EFSYS_OPT_RX_HDR_SPLIT */ #if EFSYS_OPT_RX_SCATTER - __checkReturn int + __checkReturn efx_rc_t efx_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size); @@ -1855,31 +1865,31 @@ typedef enum efx_rx_scale_support_e { EFX_RX_SCALE_SHARED /* Read-only key/indirection table */ } efx_rx_scale_support_t; - extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_hash_support_get( __in efx_nic_t *enp, __out efx_rx_hash_support_t *supportp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_scale_support_get( __in efx_nic_t *enp, __out efx_rx_scale_support_t *supportp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, __in efx_rx_hash_type_t type, __in boolean_t insert); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, __in size_t n); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, @@ -1893,7 +1903,7 @@ efx_psuedo_hdr_hash_get( #endif /* EFSYS_OPT_RX_SCALE */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_psuedo_hdr_pkt_length_get( __in efx_nic_t *enp, __in uint8_t *buffer, @@ -1915,7 +1925,7 @@ typedef enum efx_rxq_type_e { EFX_RXQ_NTYPES } efx_rxq_type_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -1952,7 +1962,7 @@ efx_rx_qpush( __in unsigned int added, __inout unsigned int *pushedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_qflush( __in efx_rxq_t *erp); @@ -1981,7 +1991,7 @@ typedef enum efx_tx_qstat_e { #endif /* EFSYS_OPT_QSTATS */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_init( __in efx_nic_t *enp); @@ -2004,7 +2014,7 @@ efx_tx_fini( #define EFX_TXQ_MAX_BUFS 8 /* Maximum independent of EFX_BUG35388_WORKAROUND. */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -2017,7 +2027,7 @@ efx_tx_qcreate( __deref_out efx_txq_t **etpp, __out unsigned int *addedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, @@ -2025,7 +2035,7 @@ efx_tx_qpost( __in unsigned int completed, __inout unsigned int *addedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns); @@ -2036,7 +2046,7 @@ efx_tx_qpush( __in unsigned int added, __in unsigned int pushed); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qflush( __in efx_txq_t *etp); @@ -2044,7 +2054,7 @@ extern void efx_tx_qenable( __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpio_enable( __in efx_txq_t *etp); @@ -2052,21 +2062,21 @@ extern void efx_tx_qpio_disable( __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpio_write( __in efx_txq_t *etp, __in_ecount(buf_length) uint8_t *buffer, __in size_t buf_length, __in size_t pio_buf_offset); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpio_post( __in efx_txq_t *etp, __in size_t pkt_length, __in unsigned int completed, __inout unsigned int *addedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, @@ -2206,7 +2216,7 @@ typedef struct efx_filter_spec_s { #define EFX_FILTER_SPEC_RX_DMAQ_ID_DROP 0xfff #define EFX_FILTER_SPEC_VID_UNSPEC 0xffff -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_init( __in efx_nic_t *enp); @@ -2214,21 +2224,21 @@ extern void efx_filter_fini( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_insert( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_remove( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_restore( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, @@ -2246,14 +2256,14 @@ efx_filter_spec_init_tx( __inout efx_filter_spec_t *spec, __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_ipv4_local( __inout efx_filter_spec_t *spec, __in uint8_t proto, __in uint32_t host, __in uint16_t port); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_ipv4_full( __inout efx_filter_spec_t *spec, __in uint8_t proto, @@ -2262,17 +2272,17 @@ efx_filter_spec_set_ipv4_full( __in uint32_t rhost, __in uint16_t rport); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_eth_local( __inout efx_filter_spec_t *spec, __in uint16_t vid, __in const uint8_t *addr); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_uc_def( __inout efx_filter_spec_t *spec); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_mc_def( __inout efx_filter_spec_t *spec); diff --git a/sys/dev/sfxge/common/efx_bootcfg.c b/sys/dev/sfxge/common/efx_bootcfg.c index 330f69dbd5a9..97e829df9adf 100644 --- a/sys/dev/sfxge/common/efx_bootcfg.c +++ b/sys/dev/sfxge/common/efx_bootcfg.c @@ -64,7 +64,7 @@ efx_bootcfg_csum( return (checksum); } -static __checkReturn int +static __checkReturn efx_rc_t efx_bootcfg_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -73,7 +73,7 @@ efx_bootcfg_verify( { size_t offset = 0; size_t used = 0; - int rc; + efx_rc_t rc; /* Start parsing tags immediatly after the checksum */ for (offset = 1; offset < size; ) { @@ -125,12 +125,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - int + efx_rc_t efx_bootcfg_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, @@ -139,7 +139,7 @@ efx_bootcfg_read( uint8_t *payload = NULL; size_t used_bytes; size_t sector_length; - int rc; + efx_rc_t rc; rc = efx_nvram_size(enp, EFX_NVRAM_BOOTROM_CFG, §or_length); if (rc != 0) @@ -238,12 +238,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - int + efx_rc_t efx_bootcfg_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -256,7 +256,7 @@ efx_bootcfg_write( size_t used_bytes; size_t offset; size_t remaining; - int rc; + efx_rc_t rc; rc = efx_nvram_size(enp, EFX_NVRAM_BOOTROM_CFG, §or_length); if (rc != 0) @@ -342,7 +342,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_ev.c b/sys/dev/sfxge/common/efx_ev.c index 9669fc450c2c..ffbe8dce31f7 100644 --- a/sys/dev/sfxge/common/efx_ev.c +++ b/sys/dev/sfxge/common/efx_ev.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_init( __in efx_nic_t *enp); @@ -64,7 +64,7 @@ static void falconsiena_ev_fini( __in efx_nic_t *enp); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -77,7 +77,7 @@ static void falconsiena_ev_qdestroy( __in efx_evq_t *eep); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_qprime( __in efx_evq_t *eep, __in unsigned int count); @@ -94,7 +94,7 @@ falconsiena_ev_qpost( __in efx_evq_t *eep, __in uint16_t data); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us); @@ -155,12 +155,12 @@ static efx_ev_ops_t __efx_ev_hunt_ops = { #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_ev_init( __in efx_nic_t *enp) { efx_ev_ops_t *eevop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR); @@ -208,7 +208,7 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); enp->en_eevop = NULL; enp->en_mod_flags &= ~EFX_MOD_EV; @@ -235,7 +235,7 @@ efx_ev_fini( } - __checkReturn int + __checkReturn efx_rc_t efx_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -247,7 +247,7 @@ efx_ev_qcreate( efx_ev_ops_t *eevop = enp->en_eevop; efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_evq_t *eep; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_EV); @@ -279,7 +279,7 @@ fail2: EFSYS_PROBE(fail2); EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_evq_t), eep); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -301,14 +301,14 @@ efx_ev_qdestroy( EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_evq_t), eep); } - __checkReturn int + __checkReturn efx_rc_t efx_ev_qprime( __in efx_evq_t *eep, __in unsigned int count) { efx_nic_t *enp = eep->ee_enp; efx_ev_ops_t *eevop = enp->en_eevop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); @@ -325,7 +325,7 @@ efx_ev_qprime( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -409,14 +409,14 @@ efx_ev_qpost( eevop->eevo_qpost(eep, data); } - __checkReturn int + __checkReturn efx_rc_t efx_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us) { efx_nic_t *enp = eep->ee_enp; efx_ev_ops_t *eevop = enp->en_eevop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); @@ -426,7 +426,7 @@ efx_ev_qmoderate( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -448,7 +448,7 @@ efx_ev_qstats_update( #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_init( __in efx_nic_t *enp) { @@ -990,7 +990,7 @@ falconsiena_ev_mcdi( #if EFSYS_OPT_MON_STATS efx_mon_stat_t id; efx_mon_stat_value_t value; - int rc; + efx_rc_t rc; if ((rc = mcdi_mon_ev(enp, eqp, &id, &value)) == 0) should_abort = eecp->eec_monitor(arg, id, value); @@ -1047,7 +1047,7 @@ out: #endif /* EFSYS_OPT_MCDI */ -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_qprime( __in efx_evq_t *eep, __in unsigned int count) @@ -1220,7 +1220,7 @@ falconsiena_ev_qpost( EFX_BAR_WRITEO(enp, FR_AZ_DRV_EV_REG, &oword); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us) @@ -1229,7 +1229,7 @@ falconsiena_ev_qmoderate( efx_nic_cfg_t *encp = &(enp->en_nic_cfg); unsigned int locked; efx_dword_t dword; - int rc; + efx_rc_t rc; if (us > encp->enc_evq_timer_max_us) { rc = EINVAL; @@ -1274,12 +1274,12 @@ falconsiena_ev_qmoderate( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -1291,7 +1291,7 @@ falconsiena_ev_qcreate( efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t size; efx_oword_t oword; - int rc; + efx_rc_t rc; EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MAXNEVS)); EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MINNEVS)); @@ -1352,7 +1352,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_filter.c b/sys/dev/sfxge/common/efx_filter.c index 7ae7ea583e8f..84f99ff9d6d9 100644 --- a/sys/dev/sfxge/common/efx_filter.c +++ b/sys/dev/sfxge/common/efx_filter.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_init( __in efx_nic_t *enp); @@ -50,22 +50,22 @@ static void falconsiena_filter_fini( __in efx_nic_t *enp); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_restore( __in efx_nic_t *enp); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_add( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec, __in boolean_t may_replace); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_delete( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, @@ -109,7 +109,7 @@ static efx_filter_ops_t __efx_filter_hunt_ops = { }; #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_filter_insert( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec) @@ -123,7 +123,7 @@ efx_filter_insert( return (efop->efo_add(enp, spec, B_FALSE)); } - __checkReturn int + __checkReturn efx_rc_t efx_filter_remove( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec) @@ -141,11 +141,11 @@ efx_filter_remove( return (efop->efo_delete(enp, spec)); } - __checkReturn int + __checkReturn efx_rc_t efx_filter_restore( __in efx_nic_t *enp) { - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER); @@ -155,17 +155,17 @@ efx_filter_restore( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_filter_init( __in efx_nic_t *enp) { efx_filter_ops_t *efop; - int rc; + efx_rc_t rc; /* Check that efx_filter_spec_t is 64 bytes. */ EFX_STATIC_ASSERT(sizeof (efx_filter_spec_t) == 64); @@ -209,7 +209,7 @@ efx_filter_init( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); enp->en_efop = NULL; enp->en_mod_flags &= ~EFX_MOD_FILTER; @@ -230,13 +230,13 @@ efx_filter_fini( enp->en_mod_flags &= ~EFX_MOD_FILTER; } - __checkReturn int + __checkReturn efx_rc_t efx_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, __out size_t *length) { - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -249,12 +249,12 @@ efx_filter_supported_filters( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_filter_reconfigure( __in efx_nic_t *enp, __in_ecount(6) uint8_t const *mac_addr, @@ -265,7 +265,7 @@ efx_filter_reconfigure( __in_ecount(6*count) uint8_t const *addrs, __in int count) { - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -282,7 +282,7 @@ efx_filter_reconfigure( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -324,7 +324,7 @@ efx_filter_spec_init_tx( /* * Specify IPv4 host, transport protocol and port in a filter specification */ -__checkReturn int +__checkReturn efx_rc_t efx_filter_spec_set_ipv4_local( __inout efx_filter_spec_t *spec, __in uint8_t proto, @@ -346,7 +346,7 @@ efx_filter_spec_set_ipv4_local( /* * Specify IPv4 hosts, transport protocol and ports in a filter specification */ -__checkReturn int +__checkReturn efx_rc_t efx_filter_spec_set_ipv4_full( __inout efx_filter_spec_t *spec, __in uint8_t proto, @@ -373,7 +373,7 @@ efx_filter_spec_set_ipv4_full( /* * Specify local Ethernet address and/or VID in filter specification */ -__checkReturn int +__checkReturn efx_rc_t efx_filter_spec_set_eth_local( __inout efx_filter_spec_t *spec, __in uint16_t vid, @@ -399,7 +399,7 @@ efx_filter_spec_set_eth_local( /* * Specify matching otherwise-unmatched unicast in a filter specification */ -__checkReturn int +__checkReturn efx_rc_t efx_filter_spec_set_uc_def( __inout efx_filter_spec_t *spec) { @@ -412,7 +412,7 @@ efx_filter_spec_set_uc_def( /* * Specify matching otherwise-unmatched multicast in a filter specification */ -__checkReturn int +__checkReturn efx_rc_t efx_filter_spec_set_mc_def( __inout efx_filter_spec_t *spec) { @@ -442,12 +442,12 @@ efx_filter_spec_set_mc_def( */ #define FILTER_CTL_SRCH_MAX 200 -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_spec_from_gen_spec( __out falconsiena_filter_spec_t *fs_spec, __in efx_filter_spec_t *gen_spec) { - int rc; + efx_rc_t rc; boolean_t is_full = B_FALSE; if (gen_spec->efs_flags & EFX_FILTER_FLAG_TX) @@ -591,7 +591,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -909,14 +909,14 @@ falconsiena_filter_build( return (key); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_push_entry( __inout efx_nic_t *enp, __in falconsiena_filter_type_t type, __in int index, __in efx_oword_t *eop) { - int rc; + efx_rc_t rc; switch (type) { case EFX_FS_FILTER_RX_TCP_FULL: @@ -986,7 +986,7 @@ falconsiena_filter_equal( return (B_TRUE); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_search( __in falconsiena_filter_tbl_t *fsftp, __in falconsiena_filter_spec_t *spec, @@ -1069,14 +1069,14 @@ falconsiena_filter_tbl_clear( EFSYS_UNLOCK(enp->en_eslp, state); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_init( __in efx_nic_t *enp) { falconsiena_filter_t *fsfp; falconsiena_filter_tbl_t *fsftp; int tbl_id; - int rc; + efx_rc_t rc; EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (falconsiena_filter_t), fsfp); @@ -1158,7 +1158,7 @@ fail2: falconsiena_filter_fini(enp); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1202,7 +1202,7 @@ falconsiena_filter_fini( } /* Restore filter state after a reset */ -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_restore( __in efx_nic_t *enp) { @@ -1213,7 +1213,7 @@ falconsiena_filter_restore( efx_oword_t filter; int filter_idx; int state; - int rc; + efx_rc_t rc; EFSYS_LOCK(enp->en_eslp, state); @@ -1245,20 +1245,20 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); EFSYS_UNLOCK(enp->en_eslp, state); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_add( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec, __in boolean_t may_replace) { - int rc; + efx_rc_t rc; falconsiena_filter_spec_t fs_spec; falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; falconsiena_filter_tbl_id_t tbl_id; @@ -1331,16 +1331,16 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_delete( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec) { - int rc; + efx_rc_t rc; falconsiena_filter_spec_t fs_spec; falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; falconsiena_filter_tbl_id_t tbl_id; @@ -1383,13 +1383,13 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #define MAX_SUPPORTED 4 -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, @@ -1397,7 +1397,7 @@ falconsiena_filter_supported_filters( { int index = 0; uint32_t rx_matches[MAX_SUPPORTED]; - int rc; + efx_rc_t rc; if (list == NULL) { rc = EINVAL; diff --git a/sys/dev/sfxge/common/efx_impl.h b/sys/dev/sfxge/common/efx_impl.h index 6f72d5fe2c38..c47fca6d660f 100644 --- a/sys/dev/sfxge/common/efx_impl.h +++ b/sys/dev/sfxge/common/efx_impl.h @@ -92,44 +92,44 @@ typedef enum efx_mac_type_e { } efx_mac_type_t; typedef struct efx_ev_ops_s { - int (*eevo_init)(efx_nic_t *); + efx_rc_t (*eevo_init)(efx_nic_t *); void (*eevo_fini)(efx_nic_t *); - int (*eevo_qcreate)(efx_nic_t *, unsigned int, + efx_rc_t (*eevo_qcreate)(efx_nic_t *, unsigned int, efsys_mem_t *, size_t, uint32_t, efx_evq_t *); void (*eevo_qdestroy)(efx_evq_t *); - int (*eevo_qprime)(efx_evq_t *, unsigned int); + efx_rc_t (*eevo_qprime)(efx_evq_t *, unsigned int); void (*eevo_qpost)(efx_evq_t *, uint16_t); - int (*eevo_qmoderate)(efx_evq_t *, unsigned int); + efx_rc_t (*eevo_qmoderate)(efx_evq_t *, unsigned int); #if EFSYS_OPT_QSTATS void (*eevo_qstats_update)(efx_evq_t *, efsys_stat_t *); #endif } efx_ev_ops_t; typedef struct efx_tx_ops_s { - int (*etxo_init)(efx_nic_t *); + efx_rc_t (*etxo_init)(efx_nic_t *); void (*etxo_fini)(efx_nic_t *); - int (*etxo_qcreate)(efx_nic_t *, + efx_rc_t (*etxo_qcreate)(efx_nic_t *, unsigned int, unsigned int, efsys_mem_t *, size_t, uint32_t, uint16_t, efx_evq_t *, efx_txq_t *, unsigned int *); void (*etxo_qdestroy)(efx_txq_t *); - int (*etxo_qpost)(efx_txq_t *, efx_buffer_t *, + efx_rc_t (*etxo_qpost)(efx_txq_t *, efx_buffer_t *, unsigned int, unsigned int, unsigned int *); void (*etxo_qpush)(efx_txq_t *, unsigned int, unsigned int); - int (*etxo_qpace)(efx_txq_t *, unsigned int); - int (*etxo_qflush)(efx_txq_t *); + efx_rc_t (*etxo_qpace)(efx_txq_t *, unsigned int); + efx_rc_t (*etxo_qflush)(efx_txq_t *); void (*etxo_qenable)(efx_txq_t *); - int (*etxo_qpio_enable)(efx_txq_t *); + efx_rc_t (*etxo_qpio_enable)(efx_txq_t *); void (*etxo_qpio_disable)(efx_txq_t *); - int (*etxo_qpio_write)(efx_txq_t *,uint8_t *, size_t, + efx_rc_t (*etxo_qpio_write)(efx_txq_t *,uint8_t *, size_t, size_t); - int (*etxo_qpio_post)(efx_txq_t *, size_t, unsigned int, + efx_rc_t (*etxo_qpio_post)(efx_txq_t *, size_t, unsigned int, unsigned int *); - int (*etxo_qdesc_post)(efx_txq_t *, efx_desc_t *, + efx_rc_t (*etxo_qdesc_post)(efx_txq_t *, efx_desc_t *, unsigned int, unsigned int, unsigned int *); void (*etxo_qdesc_dma_create)(efx_txq_t *, efsys_dma_addr_t, @@ -147,29 +147,29 @@ typedef struct efx_tx_ops_s { } efx_tx_ops_t; typedef struct efx_rx_ops_s { - int (*erxo_init)(efx_nic_t *); + efx_rc_t (*erxo_init)(efx_nic_t *); void (*erxo_fini)(efx_nic_t *); #if EFSYS_OPT_RX_HDR_SPLIT - int (*erxo_hdr_split_enable)(efx_nic_t *, unsigned int, + efx_rc_t (*erxo_hdr_split_enable)(efx_nic_t *, unsigned int, unsigned int); #endif #if EFSYS_OPT_RX_SCATTER - int (*erxo_scatter_enable)(efx_nic_t *, unsigned int); + efx_rc_t (*erxo_scatter_enable)(efx_nic_t *, unsigned int); #endif #if EFSYS_OPT_RX_SCALE - int (*erxo_scale_mode_set)(efx_nic_t *, efx_rx_hash_alg_t, + efx_rc_t (*erxo_scale_mode_set)(efx_nic_t *, efx_rx_hash_alg_t, efx_rx_hash_type_t, boolean_t); - int (*erxo_scale_key_set)(efx_nic_t *, uint8_t *, size_t); - int (*erxo_scale_tbl_set)(efx_nic_t *, unsigned int *, + efx_rc_t (*erxo_scale_key_set)(efx_nic_t *, uint8_t *, size_t); + efx_rc_t (*erxo_scale_tbl_set)(efx_nic_t *, unsigned int *, size_t); #endif void (*erxo_qpost)(efx_rxq_t *, efsys_dma_addr_t *, size_t, unsigned int, unsigned int, unsigned int); void (*erxo_qpush)(efx_rxq_t *, unsigned int, unsigned int *); - int (*erxo_qflush)(efx_rxq_t *); + efx_rc_t (*erxo_qflush)(efx_rxq_t *); void (*erxo_qenable)(efx_rxq_t *); - int (*erxo_qcreate)(efx_nic_t *enp, unsigned int, + efx_rc_t (*erxo_qcreate)(efx_nic_t *enp, unsigned int, unsigned int, efx_rxq_type_t, efsys_mem_t *, size_t, uint32_t, efx_evq_t *, efx_rxq_t *); @@ -177,54 +177,54 @@ typedef struct efx_rx_ops_s { } efx_rx_ops_t; typedef struct efx_mac_ops_s { - int (*emo_reset)(efx_nic_t *); /* optional */ - int (*emo_poll)(efx_nic_t *, efx_link_mode_t *); - int (*emo_up)(efx_nic_t *, boolean_t *); - int (*emo_addr_set)(efx_nic_t *); - int (*emo_reconfigure)(efx_nic_t *); - int (*emo_multicast_list_set)(efx_nic_t *); - int (*emo_filter_default_rxq_set)(efx_nic_t *, + efx_rc_t (*emo_reset)(efx_nic_t *); /* optional */ + efx_rc_t (*emo_poll)(efx_nic_t *, efx_link_mode_t *); + efx_rc_t (*emo_up)(efx_nic_t *, boolean_t *); + efx_rc_t (*emo_addr_set)(efx_nic_t *); + efx_rc_t (*emo_reconfigure)(efx_nic_t *); + efx_rc_t (*emo_multicast_list_set)(efx_nic_t *); + efx_rc_t (*emo_filter_default_rxq_set)(efx_nic_t *, efx_rxq_t *, boolean_t); void (*emo_filter_default_rxq_clear)(efx_nic_t *); #if EFSYS_OPT_LOOPBACK - int (*emo_loopback_set)(efx_nic_t *, efx_link_mode_t, + efx_rc_t (*emo_loopback_set)(efx_nic_t *, efx_link_mode_t, efx_loopback_type_t); #endif /* EFSYS_OPT_LOOPBACK */ #if EFSYS_OPT_MAC_STATS - int (*emo_stats_upload)(efx_nic_t *, efsys_mem_t *); - int (*emo_stats_periodic)(efx_nic_t *, efsys_mem_t *, + efx_rc_t (*emo_stats_upload)(efx_nic_t *, efsys_mem_t *); + efx_rc_t (*emo_stats_periodic)(efx_nic_t *, efsys_mem_t *, uint16_t, boolean_t); - int (*emo_stats_update)(efx_nic_t *, efsys_mem_t *, + efx_rc_t (*emo_stats_update)(efx_nic_t *, efsys_mem_t *, efsys_stat_t *, uint32_t *); #endif /* EFSYS_OPT_MAC_STATS */ } efx_mac_ops_t; typedef struct efx_phy_ops_s { - int (*epo_power)(efx_nic_t *, boolean_t); /* optional */ - int (*epo_reset)(efx_nic_t *); - int (*epo_reconfigure)(efx_nic_t *); - int (*epo_verify)(efx_nic_t *); - int (*epo_uplink_check)(efx_nic_t *, + efx_rc_t (*epo_power)(efx_nic_t *, boolean_t); /* optional */ + efx_rc_t (*epo_reset)(efx_nic_t *); + efx_rc_t (*epo_reconfigure)(efx_nic_t *); + efx_rc_t (*epo_verify)(efx_nic_t *); + efx_rc_t (*epo_uplink_check)(efx_nic_t *, boolean_t *); /* optional */ - int (*epo_downlink_check)(efx_nic_t *, efx_link_mode_t *, + efx_rc_t (*epo_downlink_check)(efx_nic_t *, efx_link_mode_t *, unsigned int *, uint32_t *); - int (*epo_oui_get)(efx_nic_t *, uint32_t *); + efx_rc_t (*epo_oui_get)(efx_nic_t *, uint32_t *); #if EFSYS_OPT_PHY_STATS - int (*epo_stats_update)(efx_nic_t *, efsys_mem_t *, + efx_rc_t (*epo_stats_update)(efx_nic_t *, efsys_mem_t *, uint32_t *); #endif /* EFSYS_OPT_PHY_STATS */ #if EFSYS_OPT_PHY_PROPS #if EFSYS_OPT_NAMES const char *(*epo_prop_name)(efx_nic_t *, unsigned int); #endif /* EFSYS_OPT_PHY_PROPS */ - int (*epo_prop_get)(efx_nic_t *, unsigned int, uint32_t, + efx_rc_t (*epo_prop_get)(efx_nic_t *, unsigned int, uint32_t, uint32_t *); - int (*epo_prop_set)(efx_nic_t *, unsigned int, uint32_t); + efx_rc_t (*epo_prop_set)(efx_nic_t *, unsigned int, uint32_t); #endif /* EFSYS_OPT_PHY_PROPS */ #if EFSYS_OPT_BIST - int (*epo_bist_enable_offline)(efx_nic_t *); - int (*epo_bist_start)(efx_nic_t *, efx_bist_type_t); - int (*epo_bist_poll)(efx_nic_t *, efx_bist_type_t, + efx_rc_t (*epo_bist_enable_offline)(efx_nic_t *); + efx_rc_t (*epo_bist_start)(efx_nic_t *, efx_bist_type_t); + efx_rc_t (*epo_bist_poll)(efx_nic_t *, efx_bist_type_t, efx_bist_result_t *, uint32_t *, unsigned long *, size_t); void (*epo_bist_stop)(efx_nic_t *, efx_bist_type_t); @@ -233,19 +233,19 @@ typedef struct efx_phy_ops_s { #if EFSYS_OPT_FILTER typedef struct efx_filter_ops_s { - int (*efo_init)(efx_nic_t *); - void (*efo_fini)(efx_nic_t *); - int (*efo_restore)(efx_nic_t *); - int (*efo_add)(efx_nic_t *, efx_filter_spec_t *, - boolean_t may_replace); - int (*efo_delete)(efx_nic_t *, efx_filter_spec_t *); - int (*efo_supported_filters)(efx_nic_t *, uint32_t *, size_t *); - int (*efo_reconfigure)(efx_nic_t *, uint8_t const *, boolean_t, + efx_rc_t (*efo_init)(efx_nic_t *); + void (*efo_fini)(efx_nic_t *); + efx_rc_t (*efo_restore)(efx_nic_t *); + efx_rc_t (*efo_add)(efx_nic_t *, efx_filter_spec_t *, + boolean_t may_replace); + efx_rc_t (*efo_delete)(efx_nic_t *, efx_filter_spec_t *); + efx_rc_t (*efo_supported_filters)(efx_nic_t *, uint32_t *, size_t *); + efx_rc_t (*efo_reconfigure)(efx_nic_t *, uint8_t const *, boolean_t, boolean_t, boolean_t, boolean_t, uint8_t const *, int); } efx_filter_ops_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_reconfigure( __in efx_nic_t *enp, __in_ecount(6) uint8_t const *mac_addr, @@ -259,13 +259,14 @@ efx_filter_reconfigure( #endif /* EFSYS_OPT_FILTER */ typedef struct efx_pktfilter_ops_s { - int (*epfo_set)(efx_nic_t *, + efx_rc_t (*epfo_set)(efx_nic_t *, boolean_t unicst, boolean_t brdcast); #if EFSYS_OPT_MCAST_FILTER_LIST - int (*epfo_mcast_list_set)(efx_nic_t *, uint8_t const *addrs, int count); + efx_rc_t (*epfo_mcast_list_set)(efx_nic_t *, + uint8_t const *addrs, int count); #endif /* EFSYS_OPT_MCAST_FILTER_LIST */ - int (*epfo_mcast_all)(efx_nic_t *); + efx_rc_t (*epfo_mcast_all)(efx_nic_t *); } efx_pktfilter_ops_t; typedef struct efx_port_s { @@ -324,11 +325,11 @@ typedef struct efx_port_s { } efx_port_t; typedef struct efx_mon_ops_s { - int (*emo_reset)(efx_nic_t *); - int (*emo_reconfigure)(efx_nic_t *); + efx_rc_t (*emo_reset)(efx_nic_t *); + efx_rc_t (*emo_reconfigure)(efx_nic_t *); #if EFSYS_OPT_MON_STATS - int (*emo_stats_update)(efx_nic_t *, efsys_mem_t *, - efx_mon_stat_value_t *); + efx_rc_t (*emo_stats_update)(efx_nic_t *, efsys_mem_t *, + efx_mon_stat_value_t *); #endif /* EFSYS_OPT_MON_STATS */ } efx_mon_ops_t; @@ -338,11 +339,11 @@ typedef struct efx_mon_s { } efx_mon_t; typedef struct efx_intr_ops_s { - int (*eio_init)(efx_nic_t *, efx_intr_type_t, efsys_mem_t *); + efx_rc_t (*eio_init)(efx_nic_t *, efx_intr_type_t, efsys_mem_t *); void (*eio_enable)(efx_nic_t *); void (*eio_disable)(efx_nic_t *); void (*eio_disable_unlocked)(efx_nic_t *); - int (*eio_trigger)(efx_nic_t *, unsigned int); + efx_rc_t (*eio_trigger)(efx_nic_t *, unsigned int); void (*eio_fini)(efx_nic_t *); } efx_intr_ops_t; @@ -354,19 +355,19 @@ typedef struct efx_intr_s { } efx_intr_t; typedef struct efx_nic_ops_s { - int (*eno_probe)(efx_nic_t *); - int (*eno_set_drv_limits)(efx_nic_t *, efx_drv_limits_t*); - int (*eno_reset)(efx_nic_t *); - int (*eno_init)(efx_nic_t *); - int (*eno_get_vi_pool)(efx_nic_t *, uint32_t *); - int (*eno_get_bar_region)(efx_nic_t *, efx_nic_region_t, + efx_rc_t (*eno_probe)(efx_nic_t *); + efx_rc_t (*eno_set_drv_limits)(efx_nic_t *, efx_drv_limits_t*); + efx_rc_t (*eno_reset)(efx_nic_t *); + efx_rc_t (*eno_init)(efx_nic_t *); + efx_rc_t (*eno_get_vi_pool)(efx_nic_t *, uint32_t *); + efx_rc_t (*eno_get_bar_region)(efx_nic_t *, efx_nic_region_t, uint32_t *, size_t *); #if EFSYS_OPT_DIAG - int (*eno_sram_test)(efx_nic_t *, efx_sram_pattern_fn_t); - int (*eno_register_test)(efx_nic_t *); + efx_rc_t (*eno_sram_test)(efx_nic_t *, efx_sram_pattern_fn_t); + efx_rc_t (*eno_register_test)(efx_nic_t *); #endif /* EFSYS_OPT_DIAG */ - void (*eno_fini)(efx_nic_t *); - void (*eno_unprobe)(efx_nic_t *); + void (*eno_fini)(efx_nic_t *); + void (*eno_unprobe)(efx_nic_t *); } efx_nic_ops_t; #ifndef EFX_TXQ_LIMIT_TARGET @@ -452,15 +453,15 @@ falconsiena_filter_tbl_clear( #if EFSYS_OPT_MCDI typedef struct efx_mcdi_ops_s { - int (*emco_init)(efx_nic_t *, const efx_mcdi_transport_t *); + efx_rc_t (*emco_init)(efx_nic_t *, const efx_mcdi_transport_t *); void (*emco_request_copyin)(efx_nic_t *, efx_mcdi_req_t *, unsigned int, boolean_t, boolean_t); boolean_t (*emco_request_poll)(efx_nic_t *); void (*emco_request_copyout)(efx_nic_t *, efx_mcdi_req_t *); - int (*emco_poll_reboot)(efx_nic_t *); + efx_rc_t (*emco_poll_reboot)(efx_nic_t *); void (*emco_fini)(efx_nic_t *); - int (*emco_fw_update_supported)(efx_nic_t *, boolean_t *); - int (*emco_macaddr_change_supported)(efx_nic_t *, boolean_t *); + efx_rc_t (*emco_fw_update_supported)(efx_nic_t *, boolean_t *); + efx_rc_t (*emco_macaddr_change_supported)(efx_nic_t *, boolean_t *); } efx_mcdi_ops_t; typedef struct efx_mcdi_s { @@ -474,49 +475,52 @@ typedef struct efx_mcdi_s { #if EFSYS_OPT_NVRAM typedef struct efx_nvram_ops_s { #if EFSYS_OPT_DIAG - int (*envo_test)(efx_nic_t *); + efx_rc_t (*envo_test)(efx_nic_t *); #endif /* EFSYS_OPT_DIAG */ - int (*envo_size)(efx_nic_t *, efx_nvram_type_t, size_t *); - int (*envo_get_version)(efx_nic_t *, efx_nvram_type_t, - uint32_t *, uint16_t *); - int (*envo_rw_start)(efx_nic_t *, efx_nvram_type_t, size_t *); - int (*envo_read_chunk)(efx_nic_t *, efx_nvram_type_t, - unsigned int, caddr_t, size_t); - int (*envo_erase)(efx_nic_t *, efx_nvram_type_t); - int (*envo_write_chunk)(efx_nic_t *, efx_nvram_type_t, - unsigned int, caddr_t, size_t); - void (*envo_rw_finish)(efx_nic_t *, efx_nvram_type_t); - int (*envo_set_version)(efx_nic_t *, efx_nvram_type_t, uint16_t *); + efx_rc_t (*envo_size)(efx_nic_t *, efx_nvram_type_t, size_t *); + efx_rc_t (*envo_get_version)(efx_nic_t *, efx_nvram_type_t, + uint32_t *, uint16_t *); + efx_rc_t (*envo_rw_start)(efx_nic_t *, efx_nvram_type_t, size_t *); + efx_rc_t (*envo_read_chunk)(efx_nic_t *, efx_nvram_type_t, + unsigned int, caddr_t, size_t); + efx_rc_t (*envo_erase)(efx_nic_t *, efx_nvram_type_t); + efx_rc_t (*envo_write_chunk)(efx_nic_t *, efx_nvram_type_t, + unsigned int, caddr_t, size_t); + void (*envo_rw_finish)(efx_nic_t *, efx_nvram_type_t); + efx_rc_t (*envo_set_version)(efx_nic_t *, efx_nvram_type_t, + uint16_t *); } efx_nvram_ops_t; #endif /* EFSYS_OPT_NVRAM */ #if EFSYS_OPT_VPD typedef struct efx_vpd_ops_s { - int (*evpdo_init)(efx_nic_t *); - int (*evpdo_size)(efx_nic_t *, size_t *); - int (*evpdo_read)(efx_nic_t *, caddr_t, size_t); - int (*evpdo_verify)(efx_nic_t *, caddr_t, size_t); - int (*evpdo_reinit)(efx_nic_t *, caddr_t, size_t); - int (*evpdo_get)(efx_nic_t *, caddr_t, size_t, efx_vpd_value_t *); - int (*evpdo_set)(efx_nic_t *, caddr_t, size_t, efx_vpd_value_t *); - int (*evpdo_next)(efx_nic_t *, caddr_t, size_t, efx_vpd_value_t *, - unsigned int *); - int (*evpdo_write)(efx_nic_t *, caddr_t, size_t); - void (*evpdo_fini)(efx_nic_t *); + efx_rc_t (*evpdo_init)(efx_nic_t *); + efx_rc_t (*evpdo_size)(efx_nic_t *, size_t *); + efx_rc_t (*evpdo_read)(efx_nic_t *, caddr_t, size_t); + efx_rc_t (*evpdo_verify)(efx_nic_t *, caddr_t, size_t); + efx_rc_t (*evpdo_reinit)(efx_nic_t *, caddr_t, size_t); + efx_rc_t (*evpdo_get)(efx_nic_t *, caddr_t, size_t, + efx_vpd_value_t *); + efx_rc_t (*evpdo_set)(efx_nic_t *, caddr_t, size_t, + efx_vpd_value_t *); + efx_rc_t (*evpdo_next)(efx_nic_t *, caddr_t, size_t, + efx_vpd_value_t *, unsigned int *); + efx_rc_t (*evpdo_write)(efx_nic_t *, caddr_t, size_t); + void (*evpdo_fini)(efx_nic_t *); } efx_vpd_ops_t; #endif /* EFSYS_OPT_VPD */ #if EFSYS_OPT_VPD || EFSYS_OPT_NVRAM - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_partitions( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size, __out unsigned int *npartnp); - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_metadata( __in efx_nic_t *enp, __in uint32_t partn, @@ -525,7 +529,7 @@ efx_mcdi_nvram_metadata( __out_bcount_opt(size) char *descp, __in size_t size); - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_info( __in efx_nic_t *enp, __in uint32_t partn, @@ -533,12 +537,12 @@ efx_mcdi_nvram_info( __out_opt uint32_t *addressp, __out_opt uint32_t *erase_sizep); - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_update_start( __in efx_nic_t *enp, __in uint32_t partn); - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_read( __in efx_nic_t *enp, __in uint32_t partn, @@ -546,14 +550,14 @@ efx_mcdi_nvram_read( __out_bcount(size) caddr_t data, __in size_t size); - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_erase( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t offset, __in size_t size); - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_write( __in efx_nic_t *enp, __in uint32_t partn, @@ -561,7 +565,7 @@ efx_mcdi_nvram_write( __out_bcount(size) caddr_t data, __in size_t size); - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_update_finish( __in efx_nic_t *enp, __in uint32_t partn, @@ -569,7 +573,7 @@ efx_mcdi_nvram_update_finish( #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_test( __in efx_nic_t *enp, __in uint32_t partn); @@ -1044,11 +1048,11 @@ struct efx_txq_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_biu_test( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_select( __in efx_nic_t *enp); @@ -1059,7 +1063,7 @@ efx_mac_multicast_hash_compute( __out efx_oword_t *hash_low, __out efx_oword_t *hash_high); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_probe( __in efx_nic_t *enp); @@ -1071,25 +1075,25 @@ efx_phy_unprobe( /* VPD utility functions */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_hunk_length( __in_bcount(size) caddr_t data, __in size_t size, __out size_t *lengthp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_hunk_verify( __in_bcount(size) caddr_t data, __in size_t size, __out_opt boolean_t *cksummedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_hunk_reinit( __in_bcount(size) caddr_t data, __in size_t size, __in boolean_t wantpid); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_hunk_get( __in_bcount(size) caddr_t data, __in size_t size, @@ -1098,7 +1102,7 @@ efx_vpd_hunk_get( __out unsigned int *payloadp, __out uint8_t *paylenp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_hunk_next( __in_bcount(size) caddr_t data, __in size_t size, @@ -1108,7 +1112,7 @@ efx_vpd_hunk_next( __out_opt uint8_t *paylenp, __inout unsigned int *contp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_hunk_set( __in_bcount(size) caddr_t data, __in size_t size, @@ -1127,13 +1131,13 @@ typedef struct efx_register_set_s { efx_oword_t mask; } efx_register_set_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_test_registers( __in efx_nic_t *enp, __in efx_register_set_t *rsp, __in size_t count); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_test_tables( __in efx_nic_t *enp, __in efx_register_set_t *rsp, @@ -1144,14 +1148,14 @@ efx_nic_test_tables( #if EFSYS_OPT_MCDI -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_set_workaround( __in efx_nic_t *enp, __in uint32_t type, __in boolean_t enabled, __out_opt uint32_t *flagsp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_get_workarounds( __in efx_nic_t *enp, __out_opt uint32_t *implementedp, diff --git a/sys/dev/sfxge/common/efx_intr.c b/sys/dev/sfxge/common/efx_intr.c index d40f57f0b037..48ec3cbba253 100644 --- a/sys/dev/sfxge/common/efx_intr.c +++ b/sys/dev/sfxge/common/efx_intr.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, @@ -58,7 +58,7 @@ static void falconsiena_intr_disable_unlocked( __in efx_nic_t *enp); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_intr_trigger( __in efx_nic_t *enp, __in unsigned int level); @@ -113,7 +113,7 @@ static efx_intr_ops_t __efx_intr_hunt_ops = { #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, @@ -121,7 +121,7 @@ efx_intr_init( { efx_intr_t *eip = &(enp->en_intr); efx_intr_ops_t *eiop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); @@ -174,7 +174,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -235,7 +235,7 @@ efx_intr_disable_unlocked( } - __checkReturn int + __checkReturn efx_rc_t efx_intr_trigger( __in efx_nic_t *enp, __in unsigned int level) @@ -336,7 +336,7 @@ efx_intr_fatal( #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, @@ -417,7 +417,7 @@ falconsiena_intr_disable_unlocked( &oword, B_FALSE); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_intr_trigger( __in efx_nic_t *enp, __in unsigned int level) @@ -426,7 +426,7 @@ falconsiena_intr_trigger( efx_oword_t oword; unsigned int count; uint32_t sel; - int rc; + efx_rc_t rc; /* bug16757: No event queues can be initialized */ EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_EV)); @@ -480,7 +480,7 @@ falconsiena_intr_trigger( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_mac.c b/sys/dev/sfxge/common/efx_mac.c index 71c5da5ca408..50f9333ae274 100644 --- a/sys/dev/sfxge/common/efx_mac.c +++ b/sys/dev/sfxge/common/efx_mac.c @@ -46,9 +46,9 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_mac_multicast_list_set( - __in efx_nic_t *enp); + __in efx_nic_t *enp); #endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */ @@ -166,7 +166,7 @@ static efx_mac_ops_t *__efx_mac_ops[] = { #endif }; - __checkReturn int + __checkReturn efx_rc_t efx_mac_pdu_set( __in efx_nic_t *enp, __in size_t pdu) @@ -174,7 +174,7 @@ efx_mac_pdu_set( efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; uint32_t old_pdu; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -205,12 +205,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_addr_set( __in efx_nic_t *enp, __in uint8_t *addr) @@ -219,7 +219,7 @@ efx_mac_addr_set( efx_mac_ops_t *emop = epp->ep_emop; uint8_t old_addr[6]; uint32_t oui; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -250,12 +250,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_filter_set( __in efx_nic_t *enp, __in boolean_t all_unicst, @@ -269,7 +269,7 @@ efx_mac_filter_set( boolean_t old_mulcst; boolean_t old_all_mulcst; boolean_t old_brdcst; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -290,7 +290,7 @@ efx_mac_filter_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); epp->ep_all_unicst = old_all_unicst; epp->ep_mulcst = old_mulcst; @@ -300,14 +300,14 @@ fail1: return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_drain( __in efx_nic_t *enp, __in boolean_t enabled) { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -334,19 +334,19 @@ efx_mac_drain( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp) { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -357,12 +357,12 @@ efx_mac_up( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_fcntl_set( __in efx_nic_t *enp, __in unsigned int fcntl, @@ -374,7 +374,7 @@ efx_mac_fcntl_set( unsigned int old_fcntl; boolean_t old_autoneg; unsigned int old_adv_cap; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -432,7 +432,7 @@ fail2: epp->ep_adv_cap_mask = old_adv_cap; fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -468,7 +468,7 @@ efx_mac_fcntl_get( * Then efx_port_t.ep_multicst_hash could be made Falcon/Siena specific as * well. */ - __checkReturn int + __checkReturn efx_rc_t efx_mac_hash_set( __in efx_nic_t *enp, __in_ecount(EFX_MAC_HASH_BITS) unsigned int const *bucket) @@ -477,7 +477,7 @@ efx_mac_hash_set( efx_mac_ops_t *emop = epp->ep_emop; efx_oword_t old_hash[2]; unsigned int index; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -504,14 +504,14 @@ efx_mac_hash_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); memcpy(epp->ep_multicst_hash, old_hash, sizeof (old_hash)); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_multicast_list_set( __in efx_nic_t *enp, __in_ecount(6*count) uint8_t const *addrs, @@ -521,7 +521,7 @@ efx_mac_multicast_list_set( efx_mac_ops_t *emop = epp->ep_emop; uint8_t *old_mulcst_addr_list = NULL; uint32_t old_mulcst_addr_count; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -581,13 +581,13 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_filter_default_rxq_set( __in efx_nic_t *enp, __in efx_rxq_t *erp, @@ -595,7 +595,7 @@ efx_mac_filter_default_rxq_set( { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -609,7 +609,7 @@ efx_mac_filter_default_rxq_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -733,14 +733,14 @@ efx_mac_stat_name( #endif /* EFSYS_OPT_NAMES */ - __checkReturn int + __checkReturn efx_rc_t efx_mac_stats_upload( __in efx_nic_t *enp, __in efsys_mem_t *esmp) { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -759,12 +759,12 @@ efx_mac_stats_upload( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_stats_periodic( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -773,7 +773,7 @@ efx_mac_stats_periodic( { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -793,13 +793,13 @@ efx_mac_stats_periodic( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -808,7 +808,7 @@ efx_mac_stats_update( { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -823,7 +823,7 @@ efx_mac_stats_update( #endif /* EFSYS_OPT_MAC_STATS */ - __checkReturn int + __checkReturn efx_rc_t efx_mac_select( __in efx_nic_t *enp) { @@ -904,7 +904,7 @@ chosen: return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -943,14 +943,14 @@ falconsiena_mac_multicast_hash_compute( } } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_mac_multicast_list_set( - __in efx_nic_t *enp) + __in efx_nic_t *enp) { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; efx_oword_t old_hash[2]; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -968,7 +968,7 @@ falconsiena_mac_multicast_list_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); memcpy(epp->ep_multicst_hash, old_hash, sizeof (old_hash)); diff --git a/sys/dev/sfxge/common/efx_mcdi.c b/sys/dev/sfxge/common/efx_mcdi.c index e1c4b456dd59..a8bbb99fbf6e 100644 --- a/sys/dev/sfxge/common/efx_mcdi.c +++ b/sys/dev/sfxge/common/efx_mcdi.c @@ -75,13 +75,13 @@ static efx_mcdi_ops_t __efx_mcdi_hunt_ops = { - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *emtp) { efx_mcdi_ops_t *emcop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, ==, 0); @@ -136,7 +136,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); enp->en_mcdi.em_emcop = NULL; enp->en_mcdi.em_emtp = NULL; @@ -285,7 +285,7 @@ efx_mcdi_request_abort( return (aborted); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_request_errcode( __in unsigned int err) { @@ -378,7 +378,7 @@ efx_mcdi_raise_exception( emtp->emt_exception(emtp->emt_context, exception); } -static int +static efx_rc_t efx_mcdi_poll_reboot( __in efx_nic_t *enp) { @@ -524,7 +524,7 @@ efx_mcdi_ev_death( emtp->emt_ev_cpl(emtp->emt_context); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_version( __in efx_nic_t *enp, __out_ecount_opt(4) uint16_t versionp[4], @@ -540,7 +540,7 @@ efx_mcdi_version( uint16_t version[4]; uint32_t build; efx_mcdi_boot_t status; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_features, &, EFX_FEATURE_MCDI); @@ -635,19 +635,19 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_do_reboot( __in efx_nic_t *enp, __in boolean_t after_assertion) { uint8_t payload[MAX(MC_CMD_REBOOT_IN_LEN, MC_CMD_REBOOT_OUT_LEN)]; efx_mcdi_req_t req; - int rc; + efx_rc_t rc; /* * We could require the caller to have caused en_mod_flags=0 to @@ -685,26 +685,26 @@ out: return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_reboot( __in efx_nic_t *enp) { return (efx_mcdi_do_reboot(enp, B_FALSE)); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_exit_assertion_handler( __in efx_nic_t *enp) { return (efx_mcdi_do_reboot(enp, B_TRUE)); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_read_assertion( __in efx_nic_t *enp) { @@ -716,7 +716,7 @@ efx_mcdi_read_assertion( unsigned int index; unsigned int ofst; int retry; - int rc; + efx_rc_t rc; /* * Before we attempt to chat to the MC, we should verify that the MC @@ -795,7 +795,7 @@ out: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -805,7 +805,7 @@ fail1: * Internal routines for for specific MCDI requests. */ - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_drv_attach( __in efx_nic_t *enp, __in boolean_t attach) @@ -815,7 +815,7 @@ efx_mcdi_drv_attach( uint8_t payload[MAX(MC_CMD_DRV_ATTACH_IN_LEN, MC_CMD_DRV_ATTACH_EXT_OUT_LEN)]; uint32_t flags; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_DRV_ATTACH; @@ -878,12 +878,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_get_board_cfg( __in efx_nic_t *enp, __out_opt uint32_t *board_typep, @@ -894,7 +894,7 @@ efx_mcdi_get_board_cfg( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_BOARD_CFG_IN_LEN, MC_CMD_GET_BOARD_CFG_OUT_LENMIN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_BOARD_CFG; @@ -959,12 +959,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_get_resource_limits( __in efx_nic_t *enp, __out_opt uint32_t *nevqp, @@ -974,7 +974,7 @@ efx_mcdi_get_resource_limits( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_RESOURCE_LIMITS_IN_LEN, MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_RESOURCE_LIMITS; @@ -1007,12 +1007,12 @@ efx_mcdi_get_resource_limits( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_get_phy_cfg( __in efx_nic_t *enp) { @@ -1021,7 +1021,7 @@ efx_mcdi_get_phy_cfg( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_PHY_CFG_IN_LEN, MC_CMD_GET_PHY_CFG_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_PHY_CFG; @@ -1113,19 +1113,19 @@ efx_mcdi_get_phy_cfg( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_firmware_update_supported( __in efx_nic_t *enp, __out boolean_t *supportedp) { efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; - int rc; + efx_rc_t rc; if (emcop != NULL && emcop->emco_fw_update_supported != NULL) { if ((rc = emcop->emco_fw_update_supported(enp, supportedp)) @@ -1139,18 +1139,18 @@ efx_mcdi_firmware_update_supported( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp) { efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; - int rc; + efx_rc_t rc; if (emcop != NULL && emcop->emco_macaddr_change_supported != NULL) { if ((rc = emcop->emco_macaddr_change_supported(enp, supportedp)) @@ -1164,7 +1164,7 @@ efx_mcdi_macaddr_change_supported( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1177,12 +1177,12 @@ fail1: * where memory BIST tests can be run and not much else can interfere or happen. * A reboot is required to exit this mode. */ - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_bist_enable_offline( __in efx_nic_t *enp) { efx_mcdi_req_t req; - int rc; + efx_rc_t rc; EFX_STATIC_ASSERT(MC_CMD_ENABLE_OFFLINE_BIST_IN_LEN == 0); EFX_STATIC_ASSERT(MC_CMD_ENABLE_OFFLINE_BIST_OUT_LEN == 0); @@ -1203,13 +1203,13 @@ efx_mcdi_bist_enable_offline( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type) @@ -1217,7 +1217,7 @@ efx_mcdi_bist_start( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_START_BIST_IN_LEN, MC_CMD_START_BIST_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_START_BIST; @@ -1264,7 +1264,7 @@ efx_mcdi_bist_start( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1273,14 +1273,14 @@ fail1: /* Enable logging of some events (e.g. link state changes) */ - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_log_ctrl( __in efx_nic_t *enp) { efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_LOG_CTRL_IN_LEN, MC_CMD_LOG_CTRL_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_LOG_CTRL; @@ -1303,7 +1303,7 @@ efx_mcdi_log_ctrl( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1320,7 +1320,7 @@ typedef enum efx_stats_action_e EFX_STATS_DISABLE, } efx_stats_action_t; -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_mac_stats( __in efx_nic_t *enp, __in_opt efsys_mem_t *esmp, @@ -1334,7 +1334,7 @@ efx_mcdi_mac_stats( int enable = (action == EFX_STATS_ENABLE_NOEVENTS); int events = (action == EFX_STATS_ENABLE_EVENTS); int disable = (action == EFX_STATS_DISABLE); - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_MAC_STATS; @@ -1388,16 +1388,16 @@ efx_mcdi_mac_stats( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_mac_stats_clear( __in efx_nic_t *enp) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_CLEAR)) != 0) goto fail1; @@ -1405,17 +1405,17 @@ efx_mcdi_mac_stats_clear( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_mac_stats_upload( __in efx_nic_t *enp, __in efsys_mem_t *esmp) { - int rc; + efx_rc_t rc; /* * The MC DMAs aggregate statistics for our convenience, so we can @@ -1428,19 +1428,19 @@ efx_mcdi_mac_stats_upload( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_mac_stats_periodic( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __in uint16_t period, __in boolean_t events) { - int rc; + efx_rc_t rc; /* * The MC DMAs aggregate statistics for our convenience, so we can @@ -1461,7 +1461,7 @@ efx_mcdi_mac_stats_periodic( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1476,7 +1476,7 @@ fail1: * function. So if you have 3 vfs on pf 0 the 3 vfs will return (pf=0,vf=0), * (pf=0,vf=1), (pf=0,vf=2) aand the pf will return (pf=0, vf=0xffff). */ - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_get_function_info( __in efx_nic_t *enp, __out uint32_t *pfp, @@ -1485,7 +1485,7 @@ efx_mcdi_get_function_info( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_FUNCTION_INFO_IN_LEN, MC_CMD_GET_FUNCTION_INFO_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_FUNCTION_INFO; @@ -1515,12 +1515,12 @@ efx_mcdi_get_function_info( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_privilege_mask( __in efx_nic_t *enp, __in uint32_t pf, @@ -1530,7 +1530,7 @@ efx_mcdi_privilege_mask( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_PRIVILEGE_MASK_IN_LEN, MC_CMD_PRIVILEGE_MASK_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_PRIVILEGE_MASK; @@ -1562,14 +1562,14 @@ efx_mcdi_privilege_mask( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_set_workaround( __in efx_nic_t *enp, __in uint32_t type, @@ -1579,7 +1579,7 @@ efx_mcdi_set_workaround( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_WORKAROUND_IN_LEN, MC_CMD_WORKAROUND_EXT_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_WORKAROUND; @@ -1608,13 +1608,13 @@ efx_mcdi_set_workaround( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_get_workarounds( __in efx_nic_t *enp, __out_opt uint32_t *implementedp, @@ -1622,7 +1622,7 @@ efx_mcdi_get_workarounds( { efx_mcdi_req_t req; uint8_t payload[MC_CMD_GET_WORKAROUNDS_OUT_LEN]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_WORKAROUNDS; @@ -1650,7 +1650,7 @@ efx_mcdi_get_workarounds( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_mcdi.h b/sys/dev/sfxge/common/efx_mcdi.h index ea0224878162..fbcf64f61d40 100644 --- a/sys/dev/sfxge/common/efx_mcdi.h +++ b/sys/dev/sfxge/common/efx_mcdi.h @@ -94,7 +94,7 @@ efx_mcdi_ev_death( __in efx_nic_t *enp, __in int rc); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_request_errcode( __in unsigned int err); @@ -110,80 +110,80 @@ typedef enum efx_mcdi_boot_e { EFX_MCDI_BOOT_ROM, } efx_mcdi_boot_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_version( __in efx_nic_t *enp, __out_ecount_opt(4) uint16_t versionp[4], __out_opt uint32_t *buildp, __out_opt efx_mcdi_boot_t *statusp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_read_assertion( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_exit_assertion_handler( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_drv_attach( __in efx_nic_t *enp, __in boolean_t attach); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_get_board_cfg( __in efx_nic_t *enp, __out_opt uint32_t *board_typep, __out_opt efx_dword_t *capabilitiesp, __out_ecount_opt(6) uint8_t mac_addrp[6]); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_get_phy_cfg( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_firmware_update_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); #if EFSYS_OPT_BIST #if EFSYS_OPT_HUNTINGTON -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_bist_enable_offline( __in efx_nic_t *enp); #endif /* EFSYS_OPT_HUNTINGTON */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); #endif /* EFSYS_OPT_BIST */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_get_resource_limits( __in efx_nic_t *enp, __out_opt uint32_t *nevqp, __out_opt uint32_t *nrxqp, __out_opt uint32_t *ntxqp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_log_ctrl( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_mac_stats_clear( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_mac_stats_upload( __in efx_nic_t *enp, __in efsys_mem_t *esmp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_mac_stats_periodic( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -192,7 +192,7 @@ efx_mcdi_mac_stats_periodic( #if EFSYS_OPT_LOOPBACK -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_get_loopback_modes( __in efx_nic_t *enp); #endif /* EFSYS_OPT_LOOPBACK */ diff --git a/sys/dev/sfxge/common/efx_mon.c b/sys/dev/sfxge/common/efx_mon.c index 5fcd757d5b49..3574e8a5d652 100644 --- a/sys/dev/sfxge/common/efx_mon.c +++ b/sys/dev/sfxge/common/efx_mon.c @@ -148,14 +148,14 @@ static efx_mon_ops_t *__efx_mon_ops[] = { #endif }; - __checkReturn int + __checkReturn efx_rc_t efx_mon_init( __in efx_nic_t *enp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_mon_t *emp = &(enp->en_mon); efx_mon_ops_t *emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -205,7 +205,7 @@ fail2: enp->en_mod_flags &= ~EFX_MOD_MON; fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -303,7 +303,7 @@ efx_mon_stat_name( #endif /* EFSYS_OPT_NAMES */ - __checkReturn int + __checkReturn efx_rc_t efx_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -326,7 +326,7 @@ efx_mon_fini( { efx_mon_t *emp = &(enp->en_mon); efx_mon_ops_t *emop = emp->em_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -337,7 +337,7 @@ efx_mon_fini( if (emop->emo_reset != NULL) { rc = emop->emo_reset(enp); if (rc != 0) - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); } emp->em_type = EFX_MON_INVALID; diff --git a/sys/dev/sfxge/common/efx_nic.c b/sys/dev/sfxge/common/efx_nic.c index b5ad65ead44c..3799cc3bc6db 100644 --- a/sys/dev/sfxge/common/efx_nic.c +++ b/sys/dev/sfxge/common/efx_nic.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include "efx_regs.h" #include "efx_impl.h" - __checkReturn int + __checkReturn efx_rc_t efx_family( __in uint16_t venid, __in uint16_t devid, @@ -100,7 +100,7 @@ efx_family( * the hardware family by inspecting the hardware. Obviously the caller * must be damn sure they're really talking to a supported device. */ - __checkReturn int + __checkReturn efx_rc_t efx_infer_family( __in efsys_bar_t *esbp, __out efx_family_t *efp) @@ -108,7 +108,7 @@ efx_infer_family( efx_family_t family; efx_oword_t oword; unsigned int portnum; - int rc; + efx_rc_t rc; EFSYS_BAR_READO(esbp, FR_AZ_CS_DEBUG_REG_OFST, &oword, B_TRUE); portnum = EFX_OWORD_FIELD(oword, FRF_CZ_CS_PORT_NUM); @@ -151,7 +151,7 @@ efx_infer_family( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -159,12 +159,12 @@ fail1: #define EFX_BIU_MAGIC0 0x01234567 #define EFX_BIU_MAGIC1 0xfedcba98 - __checkReturn int + __checkReturn efx_rc_t efx_nic_biu_test( __in efx_nic_t *enp) { efx_oword_t oword; - int rc; + efx_rc_t rc; /* * Write magic values to scratch registers 0 and 1, then @@ -222,7 +222,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -284,7 +284,7 @@ static efx_nic_ops_t __efx_nic_hunt_ops = { #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_nic_create( __in efx_family_t family, __in efsys_identifier_t *esip, @@ -293,7 +293,7 @@ efx_nic_create( __deref_out efx_nic_t **enpp) { efx_nic_t *enp; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(family, >, EFX_FAMILY_INVALID); EFSYS_ASSERT3U(family, <, EFX_FAMILY_NTYPES); @@ -371,17 +371,17 @@ fail2: EFSYS_KMEM_FREE(esip, sizeof (efx_nic_t), enp); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nic_probe( __in efx_nic_t *enp) { efx_nic_ops_t *enop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); #if EFSYS_OPT_MCDI @@ -406,14 +406,14 @@ fail2: enop->eno_unprobe(enp); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #if EFSYS_OPT_PCIE_TUNE - __checkReturn int + __checkReturn efx_rc_t efx_nic_pcie_tune( __in efx_nic_t *enp, unsigned int nlanes) @@ -429,7 +429,7 @@ efx_nic_pcie_tune( return (ENOTSUP); } - __checkReturn int + __checkReturn efx_rc_t efx_nic_pcie_extended_sync( __in efx_nic_t *enp) { @@ -447,13 +447,13 @@ efx_nic_pcie_extended_sync( #endif /* EFSYS_OPT_PCIE_TUNE */ - __checkReturn int + __checkReturn efx_rc_t efx_nic_set_drv_limits( __inout efx_nic_t *enp, __in efx_drv_limits_t *edlp) { efx_nic_ops_t *enop = enp->en_enop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -466,12 +466,12 @@ efx_nic_set_drv_limits( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nic_get_bar_region( __in efx_nic_t *enp, __in efx_nic_region_t region, @@ -479,7 +479,7 @@ efx_nic_get_bar_region( __out size_t *sizep) { efx_nic_ops_t *enop = enp->en_enop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -500,13 +500,13 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nic_get_vi_pool( __in efx_nic_t *enp, __out uint32_t *evq_countp, @@ -515,7 +515,7 @@ efx_nic_get_vi_pool( { efx_nic_ops_t *enop = enp->en_enop; efx_nic_cfg_t *encp = &enp->en_nic_cfg; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -540,18 +540,18 @@ efx_nic_get_vi_pool( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nic_init( __in efx_nic_t *enp) { efx_nic_ops_t *enop = enp->en_enop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -571,7 +571,7 @@ efx_nic_init( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -641,13 +641,13 @@ efx_nic_destroy( EFSYS_KMEM_FREE(esip, sizeof (efx_nic_t), enp); } - __checkReturn int + __checkReturn efx_rc_t efx_nic_reset( __in efx_nic_t *enp) { efx_nic_ops_t *enop = enp->en_enop; unsigned int mod_flags; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_PROBE); @@ -678,7 +678,7 @@ efx_nic_reset( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -694,12 +694,12 @@ efx_nic_cfg_get( #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t efx_nic_register_test( __in efx_nic_t *enp) { efx_nic_ops_t *enop = enp->en_enop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -711,12 +711,12 @@ efx_nic_register_test( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nic_test_registers( __in efx_nic_t *enp, __in efx_register_set_t *rsp, @@ -726,7 +726,7 @@ efx_nic_test_registers( efx_oword_t original; efx_oword_t reg; efx_oword_t buf; - int rc; + efx_rc_t rc; while (count > 0) { /* This function is only suitable for registers */ @@ -785,7 +785,7 @@ efx_nic_test_registers( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); /* Restore the old value */ EFSYS_BAR_WRITEO(enp->en_esbp, rsp->address, &original, B_TRUE); @@ -793,7 +793,7 @@ fail1: return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nic_test_tables( __in efx_nic_t *enp, __in efx_register_set_t *rsp, @@ -805,7 +805,7 @@ efx_nic_test_tables( unsigned int address; efx_oword_t reg; efx_oword_t buf; - int rc; + efx_rc_t rc; EFSYS_ASSERT(pattern < EFX_PATTERN_NTYPES); func = __efx_sram_pattern_fns[pattern]; @@ -844,7 +844,7 @@ efx_nic_test_tables( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -955,7 +955,7 @@ efx_loopback_mask( *maskp = mask; } -__checkReturn int + __checkReturn efx_rc_t efx_mcdi_get_loopback_modes( __in efx_nic_t *enp) { @@ -965,7 +965,7 @@ efx_mcdi_get_loopback_modes( MC_CMD_GET_LOOPBACK_MODES_OUT_LEN)]; efx_qword_t mask; efx_qword_t modes; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_LOOPBACK_MODES; @@ -1032,7 +1032,7 @@ efx_mcdi_get_loopback_modes( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_nvram.c b/sys/dev/sfxge/common/efx_nvram.c index 82bb1d9842f5..c806d689eea7 100644 --- a/sys/dev/sfxge/common/efx_nvram.c +++ b/sys/dev/sfxge/common/efx_nvram.c @@ -93,12 +93,12 @@ static efx_nvram_ops_t __efx_nvram_hunt_ops = { #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_nvram_init( __in efx_nic_t *enp) { efx_nvram_ops_t *envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -135,19 +135,19 @@ efx_nvram_init( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t efx_nvram_test( __in efx_nic_t *enp) { efx_nvram_ops_t *envop = enp->en_envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM); @@ -158,21 +158,21 @@ efx_nvram_test( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_DIAG */ - __checkReturn int + __checkReturn efx_rc_t efx_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep) { efx_nvram_ops_t *envop = enp->en_envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM); @@ -185,12 +185,12 @@ efx_nvram_size( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -198,7 +198,7 @@ efx_nvram_get_version( __out_ecount(4) uint16_t version[4]) { efx_nvram_ops_t *envop = enp->en_envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -212,19 +212,19 @@ efx_nvram_get_version( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out_opt size_t *chunk_sizep) { efx_nvram_ops_t *envop = enp->en_envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM); @@ -242,12 +242,12 @@ efx_nvram_rw_start( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -256,7 +256,7 @@ efx_nvram_read_chunk( __in size_t size) { efx_nvram_ops_t *envop = enp->en_envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM); @@ -272,18 +272,18 @@ efx_nvram_read_chunk( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type) { efx_nvram_ops_t *envop = enp->en_envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM); @@ -299,12 +299,12 @@ efx_nvram_erase( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -313,7 +313,7 @@ efx_nvram_write_chunk( __in size_t size) { efx_nvram_ops_t *envop = enp->en_envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM); @@ -329,7 +329,7 @@ efx_nvram_write_chunk( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -354,14 +354,14 @@ efx_nvram_rw_finish( enp->en_nvram_locked = EFX_NVRAM_INVALID; } - __checkReturn int + __checkReturn efx_rc_t efx_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in_ecount(4) uint16_t version[4]) { efx_nvram_ops_t *envop = enp->en_envop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -382,7 +382,7 @@ efx_nvram_set_version( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -409,7 +409,7 @@ efx_nvram_fini( * Internal MCDI request handling */ - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_partitions( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, @@ -420,7 +420,7 @@ efx_mcdi_nvram_partitions( uint8_t payload[MAX(MC_CMD_NVRAM_PARTITIONS_IN_LEN, MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX)]; unsigned int npartn; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_NVRAM_PARTITIONS; @@ -465,12 +465,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_metadata( __in efx_nic_t *enp, __in uint32_t partn, @@ -482,7 +482,7 @@ efx_mcdi_nvram_metadata( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_NVRAM_METADATA_IN_LEN, MC_CMD_NVRAM_METADATA_OUT_LENMAX)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_NVRAM_METADATA; @@ -556,12 +556,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_info( __in efx_nic_t *enp, __in uint32_t partn, @@ -572,7 +572,7 @@ efx_mcdi_nvram_info( uint8_t payload[MAX(MC_CMD_NVRAM_INFO_IN_LEN, MC_CMD_NVRAM_INFO_OUT_LEN)]; efx_mcdi_req_t req; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_NVRAM_INFO; @@ -609,12 +609,12 @@ efx_mcdi_nvram_info( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_update_start( __in efx_nic_t *enp, __in uint32_t partn) @@ -622,7 +622,7 @@ efx_mcdi_nvram_update_start( uint8_t payload[MAX(MC_CMD_NVRAM_UPDATE_START_IN_LEN, MC_CMD_NVRAM_UPDATE_START_OUT_LEN)]; efx_mcdi_req_t req; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_NVRAM_UPDATE_START; @@ -643,12 +643,12 @@ efx_mcdi_nvram_update_start( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_read( __in efx_nic_t *enp, __in uint32_t partn, @@ -659,7 +659,7 @@ efx_mcdi_nvram_read( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_NVRAM_READ_IN_LEN, MC_CMD_NVRAM_READ_OUT_LENMAX)]; - int rc; + efx_rc_t rc; if (size > MC_CMD_NVRAM_READ_OUT_LENMAX) { rc = EINVAL; @@ -698,12 +698,12 @@ efx_mcdi_nvram_read( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_erase( __in efx_nic_t *enp, __in uint32_t partn, @@ -713,7 +713,7 @@ efx_mcdi_nvram_erase( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_NVRAM_ERASE_IN_LEN, MC_CMD_NVRAM_ERASE_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_NVRAM_ERASE; @@ -736,12 +736,12 @@ efx_mcdi_nvram_erase( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_write( __in efx_nic_t *enp, __in uint32_t partn, @@ -752,7 +752,7 @@ efx_mcdi_nvram_write( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_NVRAM_WRITE_IN_LENMAX, MC_CMD_NVRAM_WRITE_OUT_LEN)]; - int rc; + efx_rc_t rc; if (size > MC_CMD_NVRAM_WRITE_IN_LENMAX) { rc = EINVAL; @@ -785,12 +785,12 @@ efx_mcdi_nvram_write( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_update_finish( __in efx_nic_t *enp, __in uint32_t partn, @@ -799,7 +799,7 @@ efx_mcdi_nvram_update_finish( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_NVRAM_UPDATE_FINISH_IN_LEN, MC_CMD_NVRAM_UPDATE_FINISH_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_NVRAM_UPDATE_FINISH; @@ -821,14 +821,14 @@ efx_mcdi_nvram_update_finish( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t efx_mcdi_nvram_test( __in efx_nic_t *enp, __in uint32_t partn) @@ -837,7 +837,7 @@ efx_mcdi_nvram_test( uint8_t payload[MAX(MC_CMD_NVRAM_TEST_IN_LEN, MC_CMD_NVRAM_TEST_OUT_LEN)]; int result; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_NVRAM_TEST; @@ -876,7 +876,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_phy.c b/sys/dev/sfxge/common/efx_phy.c index 1f4a949610b0..07422086b19e 100644 --- a/sys/dev/sfxge/common/efx_phy.c +++ b/sys/dev/sfxge/common/efx_phy.c @@ -296,14 +296,14 @@ static efx_phy_ops_t __efx_phy_hunt_ops = { }; #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_phy_probe( __in efx_nic_t *enp) { efx_port_t *epp = &(enp->en_port); efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_phy_ops_t *epop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); @@ -372,7 +372,7 @@ efx_phy_probe( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); epp->ep_port = 0; epp->ep_phy_type = 0; @@ -380,7 +380,7 @@ fail1: return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_phy_verify( __in efx_nic_t *enp) { @@ -395,7 +395,7 @@ efx_phy_verify( #if EFSYS_OPT_PHY_LED_CONTROL - __checkReturn int + __checkReturn efx_rc_t efx_phy_led_set( __in efx_nic_t *enp, __in efx_phy_led_mode_t mode) @@ -404,7 +404,7 @@ efx_phy_led_set( efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; uint32_t mask; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -432,7 +432,7 @@ done: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -465,7 +465,7 @@ efx_phy_adv_cap_get( } } - __checkReturn int + __checkReturn efx_rc_t efx_phy_adv_cap_set( __in efx_nic_t *enp, __in uint32_t mask) @@ -473,7 +473,7 @@ efx_phy_adv_cap_set( efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; uint32_t old_mask; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -509,7 +509,7 @@ fail2: } fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -527,7 +527,7 @@ efx_phy_lp_cap_get( *maskp = epp->ep_lp_cap_mask; } - __checkReturn int + __checkReturn efx_rc_t efx_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip) @@ -627,7 +627,7 @@ efx_phy_stat_name( #endif /* EFSYS_OPT_NAMES */ - __checkReturn int + __checkReturn efx_rc_t efx_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -662,7 +662,7 @@ efx_phy_prop_name( } #endif /* EFSYS_OPT_NAMES */ - __checkReturn int + __checkReturn efx_rc_t efx_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, @@ -678,7 +678,7 @@ efx_phy_prop_get( return (epop->epo_prop_get(enp, id, flags, valp)); } - __checkReturn int + __checkReturn efx_rc_t efx_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, @@ -696,13 +696,13 @@ efx_phy_prop_set( #if EFSYS_OPT_BIST - __checkReturn int + __checkReturn efx_rc_t efx_bist_enable_offline( __in efx_nic_t *enp) { efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); @@ -719,20 +719,20 @@ efx_bist_enable_offline( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type) { efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); @@ -755,12 +755,12 @@ efx_bist_start( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, @@ -771,7 +771,7 @@ efx_bist_poll( { efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); @@ -794,7 +794,7 @@ efx_bist_poll( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_port.c b/sys/dev/sfxge/common/efx_port.c index a750c15edb3b..e74cfe6ff290 100644 --- a/sys/dev/sfxge/common/efx_port.c +++ b/sys/dev/sfxge/common/efx_port.c @@ -36,13 +36,13 @@ __FBSDID("$FreeBSD$"); #include "efx_types.h" #include "efx_impl.h" - __checkReturn int + __checkReturn efx_rc_t efx_port_init( __in efx_nic_t *enp) { efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -94,14 +94,14 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); enp->en_mod_flags &= ~EFX_MOD_PORT; return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_port_poll( __in efx_nic_t *enp, __out_opt efx_link_mode_t *link_modep) @@ -109,7 +109,7 @@ efx_port_poll( efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; efx_link_mode_t ignore_link_mode; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -126,14 +126,14 @@ efx_port_poll( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #if EFSYS_OPT_LOOPBACK - __checkReturn int + __checkReturn efx_rc_t efx_port_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, @@ -142,7 +142,7 @@ efx_port_loopback_set( efx_port_t *epp = &(enp->en_port); efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_mac_ops_t *emop = epp->ep_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); @@ -168,7 +168,7 @@ efx_port_loopback_set( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_rx.c b/sys/dev/sfxge/common/efx_rx.c index 3501d6ec0785..2481c861c38e 100644 --- a/sys/dev/sfxge/common/efx_rx.c +++ b/sys/dev/sfxge/common/efx_rx.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_init( __in efx_nic_t *enp); @@ -49,7 +49,7 @@ falconsiena_rx_fini( __in efx_nic_t *enp); #if EFSYS_OPT_RX_HDR_SPLIT -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_hdr_split_enable( __in efx_nic_t *enp, __in unsigned int hdr_buf_size, @@ -57,27 +57,27 @@ falconsiena_rx_hdr_split_enable( #endif /* EFSYS_OPT_RX_HDR_SPLIT */ #if EFSYS_OPT_RX_SCATTER -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size); #endif /* EFSYS_OPT_RX_SCATTER */ #if EFSYS_OPT_RX_SCALE -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, __in efx_rx_hash_type_t type, __in boolean_t insert); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, __in size_t n); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, @@ -100,7 +100,7 @@ falconsiena_rx_qpush( __in unsigned int added, __inout unsigned int *pushedp); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_qflush( __in efx_rxq_t *erp); @@ -108,7 +108,7 @@ static void falconsiena_rx_qenable( __in efx_rxq_t *erp); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -200,12 +200,12 @@ static efx_rx_ops_t __efx_rx_hunt_ops = { #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_rx_init( __inout efx_nic_t *enp) { efx_rx_ops_t *erxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); @@ -259,7 +259,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); enp->en_erxop = NULL; enp->en_mod_flags &= ~EFX_MOD_RX; @@ -284,14 +284,14 @@ efx_rx_fini( } #if EFSYS_OPT_RX_HDR_SPLIT - __checkReturn int + __checkReturn efx_rc_t efx_rx_hdr_split_enable( __in efx_nic_t *enp, __in unsigned int hdr_buf_size, __in unsigned int pld_buf_size) { efx_rx_ops_t *erxop = enp->en_erxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); @@ -304,19 +304,19 @@ efx_rx_hdr_split_enable( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_HDR_SPLIT */ #if EFSYS_OPT_RX_SCATTER - __checkReturn int + __checkReturn efx_rc_t efx_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size) { efx_rx_ops_t *erxop = enp->en_erxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); @@ -327,18 +327,18 @@ efx_rx_scatter_enable( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCATTER */ #if EFSYS_OPT_RX_SCALE - __checkReturn int + __checkReturn efx_rc_t efx_rx_hash_support_get( __in efx_nic_t *enp, __out efx_rx_hash_support_t *supportp) { - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); @@ -354,17 +354,17 @@ efx_rx_hash_support_get( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_rx_scale_support_get( __in efx_nic_t *enp, __out efx_rx_scale_support_t *supportp) { - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); @@ -380,12 +380,12 @@ efx_rx_scale_support_get( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, @@ -393,7 +393,7 @@ efx_rx_scale_mode_set( __in boolean_t insert) { efx_rx_ops_t *erxop = enp->en_erxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); @@ -407,20 +407,20 @@ efx_rx_scale_mode_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCALE - __checkReturn int + __checkReturn efx_rc_t efx_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, __in size_t n) { efx_rx_ops_t *erxop = enp->en_erxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); @@ -431,21 +431,21 @@ efx_rx_scale_key_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCALE - __checkReturn int + __checkReturn efx_rc_t efx_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, __in size_t n) { efx_rx_ops_t *erxop = enp->en_erxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); @@ -456,7 +456,7 @@ efx_rx_scale_tbl_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -493,13 +493,13 @@ efx_rx_qpush( erxop->erxo_qpush(erp, added, pushedp); } - __checkReturn int + __checkReturn efx_rc_t efx_rx_qflush( __in efx_rxq_t *erp) { efx_nic_t *enp = erp->er_enp; efx_rx_ops_t *erxop = enp->en_erxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(erp->er_magic, ==, EFX_RXQ_MAGIC); @@ -509,7 +509,7 @@ efx_rx_qflush( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -526,7 +526,7 @@ efx_rx_qenable( erxop->erxo_qenable(erp); } - __checkReturn int + __checkReturn efx_rc_t efx_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -540,7 +540,7 @@ efx_rx_qcreate( { efx_rx_ops_t *erxop = enp->en_erxop; efx_rxq_t *erp; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); @@ -573,7 +573,7 @@ fail2: EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_rxq_t), erp); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -623,7 +623,7 @@ efx_rx_qdestroy( * (16 bits, big-endian, 0 if the packet did not have an inner VLAN tag) */ - __checkReturn int + __checkReturn efx_rc_t efx_psuedo_hdr_pkt_length_get( __in efx_nic_t *enp, __in uint8_t *buffer, @@ -678,7 +678,7 @@ efx_psuedo_hdr_hash_get( #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_init( __in efx_nic_t *enp) { @@ -715,7 +715,7 @@ falconsiena_rx_init( } #if EFSYS_OPT_RX_HDR_SPLIT -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_hdr_split_enable( __in efx_nic_t *enp, __in unsigned int hdr_buf_size, @@ -724,7 +724,7 @@ falconsiena_rx_hdr_split_enable( unsigned int nhdr32; unsigned int npld32; efx_oword_t oword; - int rc; + efx_rc_t rc; nhdr32 = hdr_buf_size / 32; if ((nhdr32 == 0) || @@ -762,21 +762,21 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_HDR_SPLIT */ #if EFSYS_OPT_RX_SCATTER -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size) { unsigned int nbuf32; efx_oword_t oword; - int rc; + efx_rc_t rc; nbuf32 = buf_size / 32; if ((nbuf32 == 0) || @@ -806,7 +806,7 @@ falconsiena_rx_scatter_enable( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -880,14 +880,14 @@ fail1: #if EFSYS_OPT_RX_SCALE -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, __in efx_rx_hash_type_t type, __in boolean_t insert) { - int rc; + efx_rc_t rc; switch (alg) { case EFX_RX_HASHALG_LFSR: @@ -918,7 +918,7 @@ falconsiena_rx_scale_mode_set( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); EFX_RX_LFSR_HASH(enp, B_FALSE); @@ -927,7 +927,7 @@ fail1: #endif #if EFSYS_OPT_RX_SCALE -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, @@ -936,7 +936,7 @@ falconsiena_rx_scale_key_set( efx_oword_t oword; unsigned int byte; unsigned int offset; - int rc; + efx_rc_t rc; byte = 0; @@ -1047,14 +1047,14 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif #if EFSYS_OPT_RX_SCALE -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, @@ -1062,7 +1062,7 @@ falconsiena_rx_scale_tbl_set( { efx_oword_t oword; int index; - int rc; + efx_rc_t rc; EFX_STATIC_ASSERT(EFX_RSS_TBL_SIZE == FR_BZ_RX_INDIRECTION_TBL_ROWS); EFX_STATIC_ASSERT(EFX_MAXRSS == (1 << FRF_BZ_IT_QUEUE_WIDTH)); @@ -1109,7 +1109,7 @@ falconsiena_rx_scale_tbl_set( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1185,7 +1185,7 @@ falconsiena_rx_qpush( erp->er_index, &dword, B_FALSE); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_qflush( __in efx_rxq_t *erp) { @@ -1223,7 +1223,7 @@ falconsiena_rx_qenable( erp->er_index, &oword, B_TRUE); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -1240,7 +1240,7 @@ falconsiena_rx_qcreate( uint32_t size; boolean_t split; boolean_t jumbo; - int rc; + efx_rc_t rc; EFX_STATIC_ASSERT(EFX_EV_RX_NLABELS == (1 << FRF_AZ_RX_DESCQ_LABEL_WIDTH)); @@ -1334,7 +1334,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_sram.c b/sys/dev/sfxge/common/efx_sram.c index 4bd951b7466b..862447861467 100644 --- a/sys/dev/sfxge/common/efx_sram.c +++ b/sys/dev/sfxge/common/efx_sram.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include "efx_regs.h" #include "efx_impl.h" - __checkReturn int + __checkReturn efx_rc_t efx_sram_buf_tbl_set( __in efx_nic_t *enp, __in uint32_t id, @@ -50,7 +50,7 @@ efx_sram_buf_tbl_set( efsys_dma_addr_t addr; efx_oword_t oword; unsigned int count; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); @@ -158,7 +158,7 @@ fail2: EFX_BAR_WRITEO(enp, FR_AZ_BUF_TBL_UPD_REG, &oword); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -306,7 +306,7 @@ efx_sram_pattern_fn_t __efx_sram_pattern_fns[] = { efx_sram_bit_sweep_set }; - __checkReturn int + __checkReturn efx_rc_t efx_sram_test( __in efx_nic_t *enp, __in efx_pattern_type_t type) diff --git a/sys/dev/sfxge/common/efx_tx.c b/sys/dev/sfxge/common/efx_tx.c index 95d9ade8335d..35fba0508dc3 100644 --- a/sys/dev/sfxge/common/efx_tx.c +++ b/sys/dev/sfxge/common/efx_tx.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_init( __in efx_nic_t *enp); @@ -57,7 +57,7 @@ static void falconsiena_tx_fini( __in efx_nic_t *enp); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -74,7 +74,7 @@ static void falconsiena_tx_qdestroy( __in efx_txq_t *etp); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, @@ -88,12 +88,12 @@ falconsiena_tx_qpush( __in unsigned int added, __in unsigned int pushed); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns); -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_qflush( __in efx_txq_t *etp); @@ -101,7 +101,7 @@ static void falconsiena_tx_qenable( __in efx_txq_t *etp); - __checkReturn int + __checkReturn efx_rc_t falconsiena_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, @@ -202,12 +202,12 @@ static efx_tx_ops_t __efx_tx_hunt_ops = { }; #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_tx_init( __in efx_nic_t *enp) { efx_tx_ops_t *etxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); @@ -263,7 +263,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); enp->en_etxop = NULL; enp->en_mod_flags &= ~EFX_MOD_TX; @@ -287,7 +287,7 @@ efx_tx_fini( enp->en_mod_flags &= ~EFX_MOD_TX; } - __checkReturn int + __checkReturn efx_rc_t efx_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -303,7 +303,7 @@ efx_tx_qcreate( efx_tx_ops_t *etxop = enp->en_etxop; efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_txq_t *etp; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TX); @@ -340,7 +340,7 @@ fail2: EFSYS_PROBE(fail2); EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_txq_t), etp); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -362,7 +362,7 @@ efx_tx_qdestroy( EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_txq_t), etp); } - __checkReturn int + __checkReturn efx_rc_t efx_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, @@ -372,7 +372,7 @@ efx_tx_qpost( { efx_nic_t *enp = etp->et_enp; efx_tx_ops_t *etxop = enp->en_etxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -383,7 +383,7 @@ efx_tx_qpost( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -401,14 +401,14 @@ efx_tx_qpush( etxop->etxo_qpush(etp, added, pushed); } - __checkReturn int + __checkReturn efx_rc_t efx_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns) { efx_nic_t *enp = etp->et_enp; efx_tx_ops_t *etxop = enp->en_etxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -418,17 +418,17 @@ efx_tx_qpace( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_tx_qflush( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; efx_tx_ops_t *etxop = enp->en_etxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -438,7 +438,7 @@ efx_tx_qflush( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -454,13 +454,13 @@ efx_tx_qenable( etxop->etxo_qenable(etp); } - __checkReturn int + __checkReturn efx_rc_t efx_tx_qpio_enable( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; efx_tx_ops_t *etxop = enp->en_etxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -482,7 +482,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -499,7 +499,7 @@ efx_tx_qpio_disable( etxop->etxo_qpio_disable(etp); } - __checkReturn int + __checkReturn efx_rc_t efx_tx_qpio_write( __in efx_txq_t *etp, __in_ecount(buf_length) uint8_t *buffer, @@ -508,7 +508,7 @@ efx_tx_qpio_write( { efx_nic_t *enp = etp->et_enp; efx_tx_ops_t *etxop = enp->en_etxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -522,11 +522,11 @@ efx_tx_qpio_write( return (ENOTSUP); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_tx_qpio_post( __in efx_txq_t *etp, __in size_t pkt_length, @@ -535,7 +535,7 @@ efx_tx_qpio_post( { efx_nic_t *enp = etp->et_enp; efx_tx_ops_t *etxop = enp->en_etxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -549,11 +549,11 @@ efx_tx_qpio_post( return (ENOTSUP); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, @@ -563,7 +563,7 @@ efx_tx_qdesc_post( { efx_nic_t *enp = etp->et_enp; efx_tx_ops_t *etxop = enp->en_etxop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -574,7 +574,7 @@ efx_tx_qdesc_post( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -646,7 +646,7 @@ efx_tx_qstats_update( #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_init( __in efx_nic_t *enp) { @@ -709,7 +709,7 @@ falconsiena_tx_init( _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, @@ -742,7 +742,7 @@ falconsiena_tx_qpost( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -778,7 +778,7 @@ falconsiena_tx_qpush( #define EFX_MAX_PACE_VALUE 20 #define EFX_TX_PACE_CLOCK_BASE 104 -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns) @@ -788,7 +788,7 @@ falconsiena_tx_qpace( efx_oword_t oword; unsigned int pace_val; unsigned int timer_period; - int rc; + efx_rc_t rc; if (ns == 0) { pace_val = 0; @@ -816,12 +816,12 @@ falconsiena_tx_qpace( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_qflush( __in efx_txq_t *etp) { @@ -865,7 +865,7 @@ falconsiena_tx_qenable( etp->et_index, &oword, B_TRUE); } -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -881,7 +881,7 @@ falconsiena_tx_qcreate( efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_oword_t oword; uint32_t size; - int rc; + efx_rc_t rc; EFX_STATIC_ASSERT(EFX_EV_TX_NLABELS == (1 << FRF_AZ_TX_DESCQ_LABEL_WIDTH)); @@ -935,12 +935,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t falconsiena_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, @@ -950,7 +950,7 @@ falconsiena_tx_qdesc_post( { unsigned int added = *addedp; unsigned int i; - int rc; + efx_rc_t rc; if (added - completed + n > EFX_TXQ_LIMIT(etp->et_mask + 1)) { rc = ENOSPC; @@ -977,7 +977,7 @@ falconsiena_tx_qdesc_post( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_vpd.c b/sys/dev/sfxge/common/efx_vpd.c index 44b2fda79cec..8c6e993490f1 100644 --- a/sys/dev/sfxge/common/efx_vpd.c +++ b/sys/dev/sfxge/common/efx_vpd.c @@ -108,12 +108,12 @@ static efx_vpd_ops_t __efx_vpd_hunt_ops = { #endif /* EFSYS_OPT_HUNTINGTON */ - __checkReturn int + __checkReturn efx_rc_t efx_vpd_init( __in efx_nic_t *enp) { efx_vpd_ops_t *evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -157,18 +157,18 @@ efx_vpd_init( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_size( __in efx_nic_t *enp, __out size_t *sizep) { efx_vpd_ops_t *evpdop = enp->en_evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); @@ -179,19 +179,19 @@ efx_vpd_size( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size) { efx_vpd_ops_t *evpdop = enp->en_evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); @@ -202,19 +202,19 @@ efx_vpd_read( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size) { efx_vpd_ops_t *evpdop = enp->en_evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); @@ -225,19 +225,19 @@ efx_vpd_verify( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size) { efx_vpd_ops_t *evpdop = enp->en_evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); @@ -255,12 +255,12 @@ efx_vpd_reinit( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -268,7 +268,7 @@ efx_vpd_get( __inout efx_vpd_value_t *evvp) { efx_vpd_ops_t *evpdop = enp->en_evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); @@ -279,12 +279,12 @@ efx_vpd_get( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_set( __in efx_nic_t *enp, __inout_bcount(size) caddr_t data, @@ -292,7 +292,7 @@ efx_vpd_set( __in efx_vpd_value_t *evvp) { efx_vpd_ops_t *evpdop = enp->en_evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); @@ -303,12 +303,12 @@ efx_vpd_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_next( __in efx_nic_t *enp, __inout_bcount(size) caddr_t data, @@ -317,7 +317,7 @@ efx_vpd_next( __inout unsigned int *contp) { efx_vpd_ops_t *evpdop = enp->en_evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); @@ -328,19 +328,19 @@ efx_vpd_next( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size) { efx_vpd_ops_t *evpdop = enp->en_evpdop; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); @@ -351,12 +351,12 @@ efx_vpd_write( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_vpd_next_tag( __in caddr_t data, __in size_t size, @@ -369,7 +369,7 @@ efx_vpd_next_tag( uint8_t name; uint16_t length; size_t headlen; - int rc; + efx_rc_t rc; if (*offsetp >= size) { rc = EFAULT; @@ -436,12 +436,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_vpd_next_keyword( __in_bcount(size) caddr_t tag, __in size_t size, @@ -451,7 +451,7 @@ efx_vpd_next_keyword( { efx_vpd_keyword_t keyword; uint8_t length; - int rc; + efx_rc_t rc; if (pos + 3U > size) { rc = EFAULT; @@ -474,12 +474,12 @@ efx_vpd_next_keyword( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_hunk_length( __in_bcount(size) caddr_t data, __in size_t size, @@ -488,7 +488,7 @@ efx_vpd_hunk_length( efx_vpd_tag_t tag; unsigned int offset; uint16_t taglen; - int rc; + efx_rc_t rc; offset = 0; _NOTE(CONSTANTCONDITION) @@ -506,12 +506,12 @@ efx_vpd_hunk_length( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_hunk_verify( __in_bcount(size) caddr_t data, __in size_t size, @@ -526,7 +526,7 @@ efx_vpd_hunk_verify( uint8_t keylen; uint8_t cksum; boolean_t cksummed = B_FALSE; - int rc; + efx_rc_t rc; /* * Parse every tag,keyword in the existing VPD. If the csum is present, @@ -591,7 +591,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -612,7 +612,7 @@ static uint8_t __efx_vpd_blank_r[] = { 0x00, }; - __checkReturn int + __checkReturn efx_rc_t efx_vpd_hunk_reinit( __in_bcount(size) caddr_t data, __in size_t size, @@ -622,7 +622,7 @@ efx_vpd_hunk_reinit( unsigned int pos; efx_byte_t byte; uint8_t cksum; - int rc; + efx_rc_t rc; if (size < 0x100) { rc = ENOSPC; @@ -655,12 +655,12 @@ efx_vpd_hunk_reinit( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_hunk_next( __in_bcount(size) caddr_t data, __in size_t size, @@ -678,7 +678,7 @@ efx_vpd_hunk_next( uint16_t taglen; uint8_t keylen; uint8_t paylen; - int rc; + efx_rc_t rc; offset = index = 0; _NOTE(CONSTANTCONDITION) @@ -731,12 +731,12 @@ done: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_hunk_get( __in_bcount(size) caddr_t data, __in size_t size, @@ -751,7 +751,7 @@ efx_vpd_hunk_get( unsigned int pos; uint16_t taglen; uint8_t keylen; - int rc; + efx_rc_t rc; offset = 0; _NOTE(CONSTANTCONDITION) @@ -793,12 +793,12 @@ efx_vpd_hunk_get( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_vpd_hunk_set( __in_bcount(size) caddr_t data, __in size_t size, @@ -817,7 +817,7 @@ efx_vpd_hunk_set( uint8_t keylen; uint8_t cksum; size_t used; - int rc; + efx_rc_t rc; switch (evvp->evv_tag) { case EFX_VPD_ID: @@ -1007,7 +1007,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/efx_wol.c b/sys/dev/sfxge/common/efx_wol.c index 2e1b4a169de2..d0d1fa079944 100644 --- a/sys/dev/sfxge/common/efx_wol.c +++ b/sys/dev/sfxge/common/efx_wol.c @@ -38,12 +38,12 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_WOL - __checkReturn int + __checkReturn efx_rc_t efx_wol_init( __in efx_nic_t *enp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); @@ -62,19 +62,19 @@ efx_wol_init( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_wol_filter_clear( __in efx_nic_t *enp) { efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_WOL_FILTER_RESET_IN_LEN, MC_CMD_WOL_FILTER_RESET_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_WOL); @@ -100,12 +100,12 @@ efx_wol_filter_clear( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_wol_filter_add( __in efx_nic_t *enp, __in efx_wol_type_t type, @@ -116,7 +116,7 @@ efx_wol_filter_add( uint8_t payload[MAX(MC_CMD_WOL_FILTER_SET_IN_LEN, MC_CMD_WOL_FILTER_SET_OUT_LEN)]; efx_byte_t link_mask; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_WOL); @@ -222,12 +222,12 @@ efx_wol_filter_add( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_wol_filter_remove( __in efx_nic_t *enp, __in uint32_t filter_id) @@ -235,7 +235,7 @@ efx_wol_filter_remove( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_WOL_FILTER_REMOVE_IN_LEN, MC_CMD_WOL_FILTER_REMOVE_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_WOL); @@ -259,13 +259,13 @@ efx_wol_filter_remove( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_lightsout_offload_add( __in efx_nic_t *enp, __in efx_lightsout_offload_type_t type, @@ -276,7 +276,7 @@ efx_lightsout_offload_add( uint8_t payload[MAX(MAX(MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_LEN, MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_LEN), MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_WOL); @@ -341,13 +341,13 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t efx_lightsout_offload_remove( __in efx_nic_t *enp, __in efx_lightsout_offload_type_t type, @@ -356,7 +356,7 @@ efx_lightsout_offload_remove( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_LEN, MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_WOL); @@ -397,7 +397,7 @@ efx_lightsout_offload_remove( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/hunt_ev.c b/sys/dev/sfxge/common/hunt_ev.c index 8e5cf89bc215..71d85c5c2423 100644 --- a/sys/dev/sfxge/common/hunt_ev.c +++ b/sys/dev/sfxge/common/hunt_ev.c @@ -89,7 +89,7 @@ hunt_ev_mcdi( __in_opt void *arg); -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_init_evq( __in efx_nic_t *enp, __in unsigned int instance, @@ -107,7 +107,7 @@ efx_mcdi_init_evq( int npages; int i; int supports_rx_batching; - int rc; + efx_rc_t rc; npages = EFX_EVQ_NBUFS(nevs); if (MC_CMD_INIT_EVQ_IN_LEN(npages) > MC_CMD_INIT_EVQ_IN_LENMAX) { @@ -188,12 +188,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_fini_evq( __in efx_nic_t *enp, __in uint32_t instance) @@ -201,7 +201,7 @@ efx_mcdi_fini_evq( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_FINI_EVQ_IN_LEN, MC_CMD_FINI_EVQ_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_FINI_EVQ; @@ -222,14 +222,14 @@ efx_mcdi_fini_evq( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_ev_init( __in efx_nic_t *enp) { @@ -244,7 +244,7 @@ hunt_ev_fini( _NOTE(ARGUNUSED(enp)) } - __checkReturn int + __checkReturn efx_rc_t hunt_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -255,7 +255,7 @@ hunt_ev_qcreate( { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t irq; - int rc; + efx_rc_t rc; _NOTE(ARGUNUSED(id)) /* buftbl id managed by MC */ EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MAXNEVS)); @@ -293,7 +293,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -309,7 +309,7 @@ hunt_ev_qdestroy( (void) efx_mcdi_fini_evq(eep->ee_enp, eep->ee_index); } - __checkReturn int + __checkReturn efx_rc_t hunt_ev_qprime( __in efx_evq_t *eep, __in unsigned int count) @@ -350,7 +350,7 @@ hunt_ev_qprime( return (0); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_driver_event( __in efx_nic_t *enp, __in uint32_t evq, @@ -359,7 +359,7 @@ efx_mcdi_driver_event( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_DRIVER_EVENT_IN_LEN, MC_CMD_DRIVER_EVENT_OUT_LEN)]; - int rc; + efx_rc_t rc; req.emr_cmd = MC_CMD_DRIVER_EVENT; req.emr_in_buf = payload; @@ -384,7 +384,7 @@ efx_mcdi_driver_event( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -405,7 +405,7 @@ hunt_ev_qpost( (void) efx_mcdi_driver_event(enp, eep->ee_index, event); } - __checkReturn int + __checkReturn efx_rc_t hunt_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us) @@ -414,7 +414,7 @@ hunt_ev_qmoderate( efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_dword_t dword; uint32_t timer_val, mode; - int rc; + efx_rc_t rc; if (us > encp->enc_evq_timer_max_us) { rc = EINVAL; @@ -455,7 +455,7 @@ hunt_ev_qmoderate( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -830,7 +830,7 @@ hunt_ev_mcdi( #if EFSYS_OPT_MON_STATS efx_mon_stat_t id; efx_mon_stat_value_t value; - int rc; + efx_rc_t rc; /* Decode monitor stat for MCDI sensor (if supported) */ if ((rc = mcdi_mon_ev(enp, eqp, &id, &value)) == 0) { diff --git a/sys/dev/sfxge/common/hunt_filter.c b/sys/dev/sfxge/common/hunt_filter.c index 27af7c343f2d..0666d9dc17f6 100644 --- a/sys/dev/sfxge/common/hunt_filter.c +++ b/sys/dev/sfxge/common/hunt_filter.c @@ -117,11 +117,11 @@ hunt_filter_set_entry_not_auto_old( EFSYS_ASSERT(hunt_filter_entry_spec(hftp, index) != NULL); } - __checkReturn int + __checkReturn efx_rc_t hunt_filter_init( __in efx_nic_t *enp) { - int rc; + efx_rc_t rc; hunt_filter_table_t *hftp; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -161,7 +161,7 @@ hunt_filter_init( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -178,7 +178,7 @@ hunt_filter_fini( } } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_filter_op_add( __in efx_nic_t *enp, __in efx_filter_spec_t *spec, @@ -189,7 +189,7 @@ efx_mcdi_filter_op_add( uint8_t payload[MAX(MC_CMD_FILTER_OP_IN_LEN, MC_CMD_FILTER_OP_OUT_LEN)]; uint32_t match_fields = 0; - int rc; + efx_rc_t rc; memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_FILTER_OP; @@ -312,13 +312,13 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_filter_op_delete( __in efx_nic_t *enp, __in unsigned int filter_op, @@ -327,7 +327,7 @@ efx_mcdi_filter_op_delete( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_FILTER_OP_IN_LEN, MC_CMD_FILTER_OP_OUT_LEN)]; - int rc; + efx_rc_t rc; memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_FILTER_OP; @@ -374,7 +374,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -477,7 +477,7 @@ hunt_filter_is_exclusive( return (B_FALSE); } - __checkReturn int + __checkReturn efx_rc_t hunt_filter_restore( __in efx_nic_t *enp) { @@ -486,7 +486,7 @@ hunt_filter_restore( hunt_filter_table_t *hftp = enp->en_filter.ef_hunt_filter_table; boolean_t restoring; int state; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -533,7 +533,7 @@ hunt_filter_restore( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -544,14 +544,14 @@ fail1: */ #define EFX_HUNT_FILTER_SEARCH_LIMIT 200 -static __checkReturn int +static __checkReturn efx_rc_t hunt_filter_add_internal( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec, __in boolean_t may_replace, __out_opt uint32_t *filter_id) { - int rc; + efx_rc_t rc; hunt_filter_table_t *hftp = enp->en_filter.ef_hunt_filter_table; efx_filter_spec_t *saved_spec; uint32_t hash; @@ -723,7 +723,7 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); if (locked) EFSYS_UNLOCK(enp->en_eslp, state); @@ -731,13 +731,13 @@ fail1: return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_filter_add( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec, __in boolean_t may_replace) { - int rc; + efx_rc_t rc; rc = hunt_filter_add_internal(enp, spec, may_replace, NULL); if (rc != 0) @@ -746,18 +746,18 @@ hunt_filter_add( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t hunt_filter_delete_internal( __in efx_nic_t *enp, __in uint32_t filter_id) { - int rc; + efx_rc_t rc; hunt_filter_table_t *table = enp->en_filter.ef_hunt_filter_table; efx_filter_spec_t *spec; int state; @@ -818,17 +818,17 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_filter_delete( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec) { - int rc; + efx_rc_t rc; hunt_filter_table_t *table = enp->en_filter.ef_hunt_filter_table; efx_filter_spec_t *saved_spec; unsigned int hash; @@ -872,7 +872,7 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); if (locked) EFSYS_UNLOCK(enp->en_eslp, state); @@ -880,7 +880,7 @@ fail1: return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_get_parser_disp_info( __in efx_nic_t *enp, __out uint32_t *list, @@ -889,7 +889,7 @@ efx_mcdi_get_parser_disp_info( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_PARSER_DISP_INFO_IN_LEN, MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX)]; - int rc; + efx_rc_t rc; uint32_t i; boolean_t support_unknown_ucast = B_FALSE; boolean_t support_unknown_mcast = B_FALSE; @@ -955,18 +955,18 @@ efx_mcdi_get_parser_disp_info( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, __out size_t *length) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_get_parser_disp_info(enp, list, length) != 0)) goto fail1; @@ -974,12 +974,12 @@ hunt_filter_supported_filters( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t hunt_filter_unicast_refresh( __in efx_nic_t *enp, __in_ecount(6) uint8_t const *addr, @@ -988,7 +988,7 @@ hunt_filter_unicast_refresh( { hunt_filter_table_t *hftp = enp->en_filter.ef_hunt_filter_table; efx_filter_spec_t spec; - int rc; + efx_rc_t rc; if (all_unicst == B_TRUE) goto use_uc_def; @@ -1028,7 +1028,7 @@ use_uc_def: return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); if (hftp->hft_unicst_filter_set != B_FALSE) { (void) hunt_filter_delete_internal(enp, @@ -1040,7 +1040,7 @@ fail1: return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t hunt_filter_multicast_refresh( __in efx_nic_t *enp, __in boolean_t mulcst, @@ -1054,7 +1054,7 @@ hunt_filter_multicast_refresh( efx_filter_spec_t spec; uint8_t addr[6]; unsigned i; - int rc; + efx_rc_t rc; if (all_mulcst == B_TRUE) goto use_mc_def; @@ -1142,21 +1142,21 @@ use_mc_def: return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t hunt_filter_get_workarounds( __in efx_nic_t *enp) { efx_nic_cfg_t *encp = &enp->en_nic_cfg; uint32_t implemented = 0; uint32_t enabled = 0; - int rc; + efx_rc_t rc; rc = efx_mcdi_get_workarounds(enp, &implemented, &enabled); if (rc == 0) { @@ -1178,7 +1178,7 @@ hunt_filter_get_workarounds( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); @@ -1191,7 +1191,7 @@ fail1: * return ENOTSUP (Note the filters for the specified addresses are * still applied in this case). */ - __checkReturn int + __checkReturn efx_rc_t hunt_filter_reconfigure( __in efx_nic_t *enp, __in_ecount(6) uint8_t const *mac_addr, @@ -1207,7 +1207,7 @@ hunt_filter_reconfigure( unsigned i; int all_unicst_rc; int all_mulcst_rc; - int rc; + efx_rc_t rc; if (table->hft_default_rxq == NULL) { /* @@ -1316,7 +1316,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); /* Clear auto old flags */ for (i = 0; i < EFX_ARRAY_SIZE(table->hft_entry); i++) { diff --git a/sys/dev/sfxge/common/hunt_impl.h b/sys/dev/sfxge/common/hunt_impl.h index a2be07438cc6..5ee8237358bb 100644 --- a/sys/dev/sfxge/common/hunt_impl.h +++ b/sys/dev/sfxge/common/hunt_impl.h @@ -55,7 +55,7 @@ extern "C" { /* EV */ - __checkReturn int + __checkReturn efx_rc_t hunt_ev_init( __in efx_nic_t *enp); @@ -63,7 +63,7 @@ hunt_ev_init( hunt_ev_fini( __in efx_nic_t *enp); - __checkReturn int + __checkReturn efx_rc_t hunt_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -76,7 +76,7 @@ hunt_ev_qcreate( hunt_ev_qdestroy( __in efx_evq_t *eep); - __checkReturn int + __checkReturn efx_rc_t hunt_ev_qprime( __in efx_evq_t *eep, __in unsigned int count); @@ -86,7 +86,7 @@ hunt_ev_qpost( __in efx_evq_t *eep, __in uint16_t data); - __checkReturn int + __checkReturn efx_rc_t hunt_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us); @@ -111,7 +111,7 @@ hunt_ev_rxlabel_fini( /* INTR */ - __checkReturn int + __checkReturn efx_rc_t hunt_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, @@ -129,7 +129,7 @@ hunt_intr_disable( hunt_intr_disable_unlocked( __in efx_nic_t *enp); - __checkReturn int + __checkReturn efx_rc_t hunt_intr_trigger( __in efx_nic_t *enp, __in unsigned int level); @@ -140,38 +140,38 @@ hunt_intr_fini( /* NIC */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_probe( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_set_drv_limits( __inout efx_nic_t *enp, __in efx_drv_limits_t *edlp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_get_vi_pool( __in efx_nic_t *enp, __out uint32_t *vi_countp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_get_bar_region( __in efx_nic_t *enp, __in efx_nic_region_t region, __out uint32_t *offsetp, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_reset( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_init( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_register_test( __in efx_nic_t *enp); @@ -188,29 +188,29 @@ hunt_nic_unprobe( /* MAC */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mac_poll( __in efx_nic_t *enp, __out efx_link_mode_t *link_modep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mac_addr_set( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mac_reconfigure( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mac_multicast_list_set( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mac_filter_default_rxq_set( __in efx_nic_t *enp, __in efx_rxq_t *erp, @@ -222,7 +222,7 @@ hunt_mac_filter_default_rxq_clear( #if EFSYS_OPT_LOOPBACK -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mac_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, @@ -232,7 +232,7 @@ hunt_mac_loopback_set( #if EFSYS_OPT_MAC_STATS -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -246,7 +246,7 @@ hunt_mac_stats_update( #if EFSYS_OPT_MCDI -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp); @@ -272,16 +272,16 @@ hunt_mcdi_request_copyout( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp); -extern int +extern efx_rc_t hunt_mcdi_poll_reboot( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mcdi_fw_update_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); @@ -292,7 +292,7 @@ hunt_mcdi_macaddr_change_supported( #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_buf_read_tlv( __in efx_nic_t *enp, __in_bcount(max_seg_size) caddr_t seg_data, @@ -301,7 +301,7 @@ hunt_nvram_buf_read_tlv( __deref_out_bcount_opt(*sizep) caddr_t *datap, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_buf_write_tlv( __inout_bcount(partn_size) caddr_t partn_data, __in size_t partn_size, @@ -310,7 +310,7 @@ hunt_nvram_buf_write_tlv( __in size_t tag_size, __out size_t *total_lengthp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_read_tlv( __in efx_nic_t *enp, __in uint32_t partn, @@ -318,7 +318,7 @@ hunt_nvram_partn_read_tlv( __deref_out_bcount_opt(*sizep) caddr_t *datap, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_write_tlv( __in efx_nic_t *enp, __in uint32_t partn, @@ -326,7 +326,7 @@ hunt_nvram_partn_write_tlv( __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_write_segment_tlv( __in efx_nic_t *enp, __in uint32_t partn, @@ -335,18 +335,18 @@ hunt_nvram_partn_write_segment_tlv( __in size_t size, __in boolean_t all_segments); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_size( __in efx_nic_t *enp, __in unsigned int partn, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_lock( __in efx_nic_t *enp, __in unsigned int partn); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_read( __in efx_nic_t *enp, __in unsigned int partn, @@ -354,14 +354,14 @@ hunt_nvram_partn_read( __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_erase( __in efx_nic_t *enp, __in unsigned int partn, __in unsigned int offset, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_write( __in efx_nic_t *enp, __in unsigned int partn, @@ -380,32 +380,32 @@ hunt_nvram_partn_unlock( #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4]); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *pref_chunkp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -413,12 +413,12 @@ hunt_nvram_read_chunk( __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -431,13 +431,13 @@ hunt_nvram_rw_finish( __in efx_nic_t *enp, __in efx_nvram_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_partn_set_version( __in efx_nic_t *enp, __in unsigned int partn, __in_ecount(4) uint16_t version[4]); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -465,32 +465,32 @@ hunt_phy_link_ev( __in efx_qword_t *eqp, __out efx_link_mode_t *link_modep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_get_link( __in efx_nic_t *enp, __out hunt_link_state_t *hlsp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_power( __in efx_nic_t *enp, __in boolean_t on); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_reconfigure( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_verify( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip); #if EFSYS_OPT_PHY_STATS -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -509,14 +509,14 @@ hunt_phy_prop_name( #endif /* EFSYS_OPT_NAMES */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t flags, __out uint32_t *valp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, @@ -526,16 +526,16 @@ hunt_phy_prop_set( #if EFSYS_OPT_BIST -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_bist_enable_offline( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, @@ -558,7 +558,7 @@ hunt_bist_stop( #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_sram_test( __in efx_nic_t *enp, __in efx_sram_pattern_fn_t func); @@ -568,7 +568,7 @@ hunt_sram_test( /* TX */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_init( __in efx_nic_t *enp); @@ -576,7 +576,7 @@ extern void hunt_tx_fini( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -593,7 +593,7 @@ extern void hunt_tx_qdestroy( __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, @@ -607,12 +607,12 @@ hunt_tx_qpush( __in unsigned int added, __in unsigned int pushed); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_qflush( __in efx_txq_t *etp); @@ -620,7 +620,7 @@ extern void hunt_tx_qenable( __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_qpio_enable( __in efx_txq_t *etp); @@ -628,21 +628,21 @@ extern void hunt_tx_qpio_disable( __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_qpio_write( __in efx_txq_t *etp, __in_ecount(buf_length) uint8_t *buffer, __in size_t buf_length, __in size_t pio_buf_offset); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_qpio_post( __in efx_txq_t *etp, __in size_t pkt_length, __in unsigned int completed, __inout unsigned int *addedp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, @@ -723,7 +723,7 @@ typedef uint32_t efx_piobuf_handle_t; #define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t) -1) -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_pio_alloc( __inout efx_nic_t *enp, __out uint32_t *bufnump, @@ -732,19 +732,19 @@ hunt_nic_pio_alloc( __out uint32_t *offsetp, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_pio_free( __inout efx_nic_t *enp, __in uint32_t bufnum, __in uint32_t blknum); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_pio_link( __inout efx_nic_t *enp, __in uint32_t vi_index, __in efx_piobuf_handle_t handle); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_nic_pio_unlink( __inout efx_nic_t *enp, __in uint32_t vi_index); @@ -754,48 +754,48 @@ hunt_nic_pio_unlink( #if EFSYS_OPT_VPD -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_init( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_size( __in efx_nic_t *enp, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __inout efx_vpd_value_t *evvp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_set( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_next( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -803,7 +803,7 @@ hunt_vpd_next( __out efx_vpd_value_t *evvp, __inout unsigned int *contp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -818,12 +818,12 @@ hunt_vpd_fini( /* RX */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_rx_init( __in efx_nic_t *enp); #if EFSYS_OPT_RX_HDR_SPLIT -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_rx_hdr_split_enable( __in efx_nic_t *enp, __in unsigned int hdr_buf_size, @@ -831,7 +831,7 @@ hunt_rx_hdr_split_enable( #endif /* EFSYS_OPT_RX_HDR_SPLIT */ #if EFSYS_OPT_RX_SCATTER -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size); @@ -840,20 +840,20 @@ hunt_rx_scatter_enable( #if EFSYS_OPT_RX_SCALE -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, __in efx_rx_hash_type_t type, __in boolean_t insert); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, __in size_t n); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, @@ -876,7 +876,7 @@ hunt_rx_qpush( __in unsigned int added, __inout unsigned int *pushedp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_rx_qflush( __in efx_rxq_t *erp); @@ -884,7 +884,7 @@ extern void hunt_rx_qenable( __in efx_rxq_t *erp); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -940,7 +940,7 @@ typedef struct hunt_filter_table_s { uint32_t hft_mulcst_filter_count; } hunt_filter_table_t; - __checkReturn int + __checkReturn efx_rc_t hunt_filter_init( __in efx_nic_t *enp); @@ -948,28 +948,28 @@ hunt_filter_init( hunt_filter_fini( __in efx_nic_t *enp); - __checkReturn int + __checkReturn efx_rc_t hunt_filter_restore( __in efx_nic_t *enp); - __checkReturn int + __checkReturn efx_rc_t hunt_filter_add( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec, __in boolean_t may_replace); - __checkReturn int + __checkReturn efx_rc_t hunt_filter_delete( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, __out size_t *length); -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_filter_reconfigure( __in efx_nic_t *enp, __in_ecount(6) uint8_t const *mac_addr, @@ -999,7 +999,7 @@ hunt_filter_default_rxq_clear( #endif /* EFSYS_OPT_FILTER */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_pktfilter_set( __in efx_nic_t *enp, __in boolean_t unicst, @@ -1007,7 +1007,7 @@ hunt_pktfilter_set( #if EFSYS_OPT_MCAST_FILTER_LIST -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_pktfilter_mcast_set( __in efx_nic_t *enp, __in uint8_t const *addrs, @@ -1015,17 +1015,17 @@ hunt_pktfilter_mcast_set( #endif /* EFSYS_OPT_MCAST_FILTER_LIST */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_pktfilter_mcast_all( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_get_function_info( __in efx_nic_t *enp, __out uint32_t *pfp, __out_opt uint32_t *vfp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_privilege_mask( __in efx_nic_t *enp, __in uint32_t pf, diff --git a/sys/dev/sfxge/common/hunt_intr.c b/sys/dev/sfxge/common/hunt_intr.c index b68135cfd947..d5e977ad7ee3 100644 --- a/sys/dev/sfxge/common/hunt_intr.c +++ b/sys/dev/sfxge/common/hunt_intr.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_HUNTINGTON - __checkReturn int + __checkReturn efx_rc_t hunt_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, @@ -73,7 +73,7 @@ hunt_intr_disable_unlocked( } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_trigger_interrupt( __in efx_nic_t *enp, __in unsigned int level) @@ -81,7 +81,7 @@ efx_mcdi_trigger_interrupt( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_TRIGGER_INTERRUPT_IN_LEN, MC_CMD_TRIGGER_INTERRUPT_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -112,18 +112,18 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_intr_trigger( __in efx_nic_t *enp, __in unsigned int level) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); - int rc; + efx_rc_t rc; if (encp->enc_bug41750_workaround) { /* bug 41750: Test interrupts don't work on Greenport */ @@ -139,7 +139,7 @@ hunt_intr_trigger( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/hunt_mac.c b/sys/dev/sfxge/common/hunt_mac.c index 36baacaa9f04..5d5d26fb33a9 100644 --- a/sys/dev/sfxge/common/hunt_mac.c +++ b/sys/dev/sfxge/common/hunt_mac.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_HUNTINGTON - __checkReturn int + __checkReturn efx_rc_t hunt_mac_poll( __in efx_nic_t *enp, __out efx_link_mode_t *link_modep) @@ -50,7 +50,7 @@ hunt_mac_poll( efx_port_t *epp = &(enp->en_port); hunt_link_state_t hls; - int rc; + efx_rc_t rc; if ((rc = hunt_phy_get_link(enp, &hls)) != 0) goto fail1; @@ -63,14 +63,14 @@ hunt_mac_poll( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); *link_modep = EFX_LINK_UNKNOWN; return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp) @@ -81,7 +81,7 @@ hunt_mac_up( */ hunt_link_state_t hls; - int rc; + efx_rc_t rc; /* * Because Huntington doesn't *require* polling, we can't rely on @@ -95,7 +95,7 @@ hunt_mac_up( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -107,7 +107,7 @@ fail1: * MC_CMD_VADAPTOR_SET_MAC requires mac-spoofing privilege and * the port to have no filters or queues active. */ -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_vadapter_set_mac( __in efx_nic_t *enp) { @@ -115,7 +115,7 @@ efx_mcdi_vadapter_set_mac( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_VADAPTOR_SET_MAC_IN_LEN, MC_CMD_VADAPTOR_SET_MAC_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_VADAPTOR_SET_MAC; @@ -139,16 +139,16 @@ efx_mcdi_vadapter_set_mac( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_mac_addr_set( __in efx_nic_t *enp) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_vadapter_set_mac(enp)) != 0) { if (rc != ENOTSUP) @@ -165,12 +165,12 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -__checkReturn int +__checkReturn efx_rc_t hunt_mac_reconfigure( __in efx_nic_t *enp) { @@ -178,7 +178,7 @@ hunt_mac_reconfigure( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_SET_MAC_IN_LEN, MC_CMD_SET_MAC_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_SET_MAC; @@ -242,18 +242,18 @@ hunt_mac_reconfigure( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_mac_multicast_list_set( __in efx_nic_t *enp) { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -265,12 +265,12 @@ hunt_mac_multicast_list_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_mac_filter_default_rxq_set( __in efx_nic_t *enp, __in efx_rxq_t *erp, @@ -279,7 +279,7 @@ hunt_mac_filter_default_rxq_set( efx_port_t *epp = &(enp->en_port); efx_rxq_t *old_rxq; boolean_t old_using_rss; - int rc; + efx_rc_t rc; hunt_filter_get_default_rxq(enp, &old_rxq, &old_using_rss); @@ -297,7 +297,7 @@ hunt_mac_filter_default_rxq_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); hunt_filter_default_rxq_set(enp, old_rxq, old_using_rss); @@ -322,7 +322,7 @@ hunt_mac_filter_default_rxq_clear( #if EFSYS_OPT_LOOPBACK - __checkReturn int + __checkReturn efx_rc_t hunt_mac_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, @@ -337,7 +337,7 @@ hunt_mac_loopback_set( efx_phy_ops_t *epop = epp->ep_epop; efx_loopback_type_t old_loopback_type; efx_link_mode_t old_loopback_link_mode; - int rc; + efx_rc_t rc; /* The PHY object handles this on Huntington */ old_loopback_type = epp->ep_loopback_type; @@ -351,7 +351,7 @@ hunt_mac_loopback_set( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); epp->ep_loopback_type = old_loopback_type; epp->ep_loopback_link_mode = old_loopback_link_mode; @@ -367,7 +367,7 @@ fail1: EFSYS_MEM_READQ((_esmp), (_field) * sizeof (efx_qword_t), _eqp) - __checkReturn int + __checkReturn efx_rc_t hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, diff --git a/sys/dev/sfxge/common/hunt_mcdi.c b/sys/dev/sfxge/common/hunt_mcdi.c index 8782bcce5a30..0c15a7fe9feb 100644 --- a/sys/dev/sfxge/common/hunt_mcdi.c +++ b/sys/dev/sfxge/common/hunt_mcdi.c @@ -76,14 +76,14 @@ typedef enum efx_mcdi_header_type_e { */ - __checkReturn int + __checkReturn efx_rc_t hunt_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *emtp) { efsys_mem_t *esmp = emtp->emt_dma_mem; efx_dword_t dword; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); EFSYS_ASSERT(enp->en_features & EFX_FEATURE_MCDI_DMA); @@ -117,7 +117,7 @@ hunt_mcdi_init( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -271,7 +271,7 @@ hunt_mcdi_request_poll( unsigned int length; size_t offset; int state; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); @@ -366,7 +366,7 @@ fail2: EFSYS_PROBE(fail2); fail1: if (!emrp->emr_quiet) - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); /* Fill out error state */ emrp->emr_rc = rc; @@ -380,7 +380,7 @@ out: return (B_TRUE); } - int + efx_rc_t hunt_mcdi_poll_reboot( __in efx_nic_t *enp) { @@ -388,7 +388,7 @@ hunt_mcdi_poll_reboot( efx_dword_t dword; uint32_t old_status; uint32_t new_status; - int rc; + efx_rc_t rc; old_status = emip->emi_mc_reboot_status; @@ -421,12 +421,12 @@ hunt_mcdi_poll_reboot( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_mcdi_fw_update_supported( __in efx_nic_t *enp, __out boolean_t *supportedp) @@ -443,7 +443,7 @@ hunt_mcdi_fw_update_supported( return (0); } - __checkReturn int + __checkReturn efx_rc_t hunt_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp) diff --git a/sys/dev/sfxge/common/hunt_nic.c b/sys/dev/sfxge/common/hunt_nic.c index 4c0f802107df..6ed5ebf298cb 100644 --- a/sys/dev/sfxge/common/hunt_nic.c +++ b/sys/dev/sfxge/common/hunt_nic.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include "ef10_tlv_layout.h" -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_get_port_assignment( __in efx_nic_t *enp, __out uint32_t *portp) @@ -48,7 +48,7 @@ efx_mcdi_get_port_assignment( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_PORT_ASSIGNMENT_IN_LEN, MC_CMD_GET_PORT_ASSIGNMENT_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -78,12 +78,12 @@ efx_mcdi_get_port_assignment( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_get_port_modes( __in efx_nic_t *enp, __out uint32_t *modesp) @@ -91,7 +91,7 @@ efx_mcdi_get_port_modes( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_PORT_MODES_IN_LEN, MC_CMD_GET_PORT_MODES_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -123,13 +123,13 @@ efx_mcdi_get_port_modes( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_vadaptor_alloc( __in efx_nic_t *enp, __in uint32_t port_id) @@ -137,7 +137,7 @@ efx_mcdi_vadaptor_alloc( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_VADAPTOR_ALLOC_IN_LEN, MC_CMD_VADAPTOR_ALLOC_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_vport_id, ==, EVB_PORT_ID_NULL); @@ -160,12 +160,12 @@ efx_mcdi_vadaptor_alloc( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_vadaptor_free( __in efx_nic_t *enp, __in uint32_t port_id) @@ -173,7 +173,7 @@ efx_mcdi_vadaptor_free( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_VADAPTOR_FREE_IN_LEN, MC_CMD_VADAPTOR_FREE_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_VADAPTOR_FREE; @@ -194,12 +194,12 @@ efx_mcdi_vadaptor_free( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_get_mac_address_pf( __in efx_nic_t *enp, __out_ecount_opt(6) uint8_t mac_addrp[6]) @@ -207,7 +207,7 @@ efx_mcdi_get_mac_address_pf( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_MAC_ADDRESSES_IN_LEN, MC_CMD_GET_MAC_ADDRESSES_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -251,12 +251,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_get_mac_address_vf( __in efx_nic_t *enp, __out_ecount_opt(6) uint8_t mac_addrp[6]) @@ -264,7 +264,7 @@ efx_mcdi_get_mac_address_vf( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_LEN, MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMAX)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -313,12 +313,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_get_clock( __in efx_nic_t *enp, __out uint32_t *sys_freqp) @@ -326,7 +326,7 @@ efx_mcdi_get_clock( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_CLOCK_IN_LEN, MC_CMD_GET_CLOCK_OUT_LEN)]; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -362,12 +362,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_get_vector_cfg( __in efx_nic_t *enp, __out_opt uint32_t *vec_basep, @@ -377,7 +377,7 @@ efx_mcdi_get_vector_cfg( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_VECTOR_CFG_IN_LEN, MC_CMD_GET_VECTOR_CFG_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_VECTOR_CFG; @@ -410,12 +410,12 @@ efx_mcdi_get_vector_cfg( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_get_capabilities( __in efx_nic_t *enp, __out efx_dword_t *flagsp) @@ -423,7 +423,7 @@ efx_mcdi_get_capabilities( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_CAPABILITIES_IN_LEN, MC_CMD_GET_CAPABILITIES_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_CAPABILITIES; @@ -451,13 +451,13 @@ efx_mcdi_get_capabilities( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_alloc_vis( __in efx_nic_t *enp, __in uint32_t min_vi_count, @@ -469,7 +469,7 @@ efx_mcdi_alloc_vis( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_ALLOC_VIS_IN_LEN, MC_CMD_ALLOC_VIS_OUT_LEN)]; - int rc; + efx_rc_t rc; if (vi_countp == NULL) { rc = EINVAL; @@ -511,18 +511,18 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_free_vis( __in efx_nic_t *enp) { efx_mcdi_req_t req; - int rc; + efx_rc_t rc; EFX_STATIC_ASSERT(MC_CMD_FREE_VIS_IN_LEN == 0); EFX_STATIC_ASSERT(MC_CMD_FREE_VIS_OUT_LEN == 0); @@ -544,13 +544,13 @@ efx_mcdi_free_vis( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_alloc_piobuf( __in efx_nic_t *enp, __out efx_piobuf_handle_t *handlep) @@ -558,7 +558,7 @@ efx_mcdi_alloc_piobuf( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_ALLOC_PIOBUF_IN_LEN, MC_CMD_ALLOC_PIOBUF_OUT_LEN)]; - int rc; + efx_rc_t rc; if (handlep == NULL) { rc = EINVAL; @@ -593,12 +593,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_free_piobuf( __in efx_nic_t *enp, __in efx_piobuf_handle_t handle) @@ -606,7 +606,7 @@ efx_mcdi_free_piobuf( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_FREE_PIOBUF_IN_LEN, MC_CMD_FREE_PIOBUF_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_FREE_PIOBUF; @@ -627,12 +627,12 @@ efx_mcdi_free_piobuf( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_link_piobuf( __in efx_nic_t *enp, __in uint32_t vi_index, @@ -641,7 +641,7 @@ efx_mcdi_link_piobuf( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_LINK_PIOBUF_IN_LEN, MC_CMD_LINK_PIOBUF_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_LINK_PIOBUF; @@ -663,12 +663,12 @@ efx_mcdi_link_piobuf( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_unlink_piobuf( __in efx_nic_t *enp, __in uint32_t vi_index) @@ -676,7 +676,7 @@ efx_mcdi_unlink_piobuf( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_UNLINK_PIOBUF_IN_LEN, MC_CMD_UNLINK_PIOBUF_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_UNLINK_PIOBUF; @@ -697,7 +697,7 @@ efx_mcdi_unlink_piobuf( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -709,7 +709,7 @@ hunt_nic_alloc_piobufs( { efx_piobuf_handle_t *handlep; unsigned int i; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(max_piobuf_count, <=, EFX_ARRAY_SIZE(enp->en_u.hunt.enu_piobuf_handle)); @@ -756,7 +756,7 @@ hunt_nic_free_piobufs( } /* Sub-allocate a block from a piobuf */ - __checkReturn int + __checkReturn efx_rc_t hunt_nic_pio_alloc( __inout efx_nic_t *enp, __out uint32_t *bufnump, @@ -768,7 +768,7 @@ hunt_nic_pio_alloc( efx_drv_cfg_t *edcp = &enp->en_drv_cfg; uint32_t blk_per_buf; uint32_t buf, blk; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); EFSYS_ASSERT(bufnump); @@ -813,20 +813,20 @@ done: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* Free a piobuf sub-allocated block */ - __checkReturn int + __checkReturn efx_rc_t hunt_nic_pio_free( __inout efx_nic_t *enp, __in uint32_t bufnum, __in uint32_t blknum) { uint32_t *map; - int rc; + efx_rc_t rc; if ((bufnum >= enp->en_u.hunt.enu_piobuf_count) || (blknum >= (8 * sizeof (*map)))) { @@ -846,12 +846,12 @@ hunt_nic_pio_free( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nic_pio_link( __inout efx_nic_t *enp, __in uint32_t vi_index, @@ -860,7 +860,7 @@ hunt_nic_pio_link( return (efx_mcdi_link_piobuf(enp, vi_index, handle)); } - __checkReturn int + __checkReturn efx_rc_t hunt_nic_pio_unlink( __inout efx_nic_t *enp, __in uint32_t vi_index) @@ -868,13 +868,13 @@ hunt_nic_pio_unlink( return (efx_mcdi_unlink_piobuf(enp, vi_index)); } -static __checkReturn int +static __checkReturn efx_rc_t hunt_get_datapath_caps( __in efx_nic_t *enp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_dword_t datapath_capabilities; - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_get_capabilities(enp, &datapath_capabilities)) != 0) goto fail1; @@ -925,7 +925,7 @@ hunt_get_datapath_caps( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -971,13 +971,13 @@ static struct { */ }; -static __checkReturn int +static __checkReturn efx_rc_t hunt_external_port_mapping( __in efx_nic_t *enp, __in uint32_t port, __out uint8_t *external_portp) { - int rc; + efx_rc_t rc; int i; uint32_t port_modes; uint32_t matches; @@ -1019,12 +1019,12 @@ out: return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t hunt_board_cfg( __in efx_nic_t *enp) { @@ -1041,7 +1041,7 @@ hunt_board_cfg( uint32_t flags; uint32_t sysclk; uint32_t base, nvec; - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_get_port_assignment(enp, &port)) != 0) goto fail1; @@ -1310,19 +1310,19 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nic_probe( __in efx_nic_t *enp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_drv_cfg_t *edcp = &(enp->en_drv_cfg); - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); @@ -1398,12 +1398,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nic_set_drv_limits( __inout efx_nic_t *enp, __in efx_drv_limits_t *edlp) @@ -1413,7 +1413,7 @@ hunt_nic_set_drv_limits( uint32_t min_evq_count, max_evq_count; uint32_t min_rxq_count, max_rxq_count; uint32_t min_txq_count, max_txq_count; - int rc; + efx_rc_t rc; if (edlp == NULL) { rc = EINVAL; @@ -1471,20 +1471,20 @@ hunt_nic_set_drv_limits( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nic_reset( __in efx_nic_t *enp) { efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_ENTITY_RESET_IN_LEN, MC_CMD_ENTITY_RESET_OUT_LEN)]; - int rc; + efx_rc_t rc; /* hunt_nic_reset() is called to recover from BADASSERT failures. */ if ((rc = efx_mcdi_read_assertion(enp)) != 0) @@ -1519,12 +1519,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nic_init( __in efx_nic_t *enp) { @@ -1532,7 +1532,7 @@ hunt_nic_init( uint32_t min_vi_count, max_vi_count; uint32_t vi_count, vi_base; uint32_t i; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); @@ -1642,12 +1642,12 @@ fail2: hunt_nic_free_piobufs(enp); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nic_get_vi_pool( __in efx_nic_t *enp, __out uint32_t *vi_countp) @@ -1663,14 +1663,14 @@ hunt_nic_get_vi_pool( return (0); } - __checkReturn int + __checkReturn efx_rc_t hunt_nic_get_bar_region( __in efx_nic_t *enp, __in efx_nic_region_t region, __out uint32_t *offsetp, __out size_t *sizep) { - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); @@ -1700,7 +1700,7 @@ hunt_nic_get_bar_region( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1710,7 +1710,7 @@ hunt_nic_fini( __in efx_nic_t *enp) { uint32_t i; - int rc; + efx_rc_t rc; (void) efx_mcdi_vadaptor_free(enp, enp->en_vport_id); enp->en_vport_id = 0; @@ -1743,11 +1743,11 @@ hunt_nic_unprobe( #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t hunt_nic_register_test( __in efx_nic_t *enp) { - int rc; + efx_rc_t rc; /* FIXME */ _NOTE(ARGUNUSED(enp)) @@ -1760,7 +1760,7 @@ hunt_nic_register_test( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/hunt_nvram.c b/sys/dev/sfxge/common/hunt_nvram.c index 1816900eb017..f90d5a220d2c 100644 --- a/sys/dev/sfxge/common/hunt_nvram.c +++ b/sys/dev/sfxge/common/hunt_nvram.c @@ -51,7 +51,7 @@ typedef struct tlv_cursor_s { uint32_t *limit; /* Last dword of data block */ } tlv_cursor_t; -static __checkReturn int +static __checkReturn efx_rc_t tlv_validate_state( __in tlv_cursor_t *cursor); @@ -125,11 +125,11 @@ tlv_next_item_ptr( return (cursor->current + TLV_DWORD_COUNT(length)); } -static int +static efx_rc_t tlv_advance( __in tlv_cursor_t *cursor) { - int rc; + efx_rc_t rc; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; @@ -154,16 +154,16 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static int +static efx_rc_t tlv_rewind( __in tlv_cursor_t *cursor) { - int rc; + efx_rc_t rc; cursor->current = cursor->block; @@ -173,17 +173,17 @@ tlv_rewind( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static int +static efx_rc_t tlv_find( __in tlv_cursor_t *cursor, __in uint32_t tag) { - int rc; + efx_rc_t rc; rc = tlv_rewind(cursor); while (rc == 0) { @@ -195,11 +195,11 @@ tlv_find( return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t tlv_validate_state( __in tlv_cursor_t *cursor) { - int rc; + efx_rc_t rc; /* Check cursor position */ if (cursor->current < cursor->block) { @@ -236,12 +236,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static int +static efx_rc_t tlv_init_cursor( __in tlv_cursor_t *cursor, __in uint32_t *block, @@ -256,7 +256,7 @@ tlv_init_cursor( return (tlv_validate_state(cursor)); } -static int +static efx_rc_t tlv_init_cursor_from_size( __in tlv_cursor_t *cursor, __in uint8_t *block, @@ -267,12 +267,12 @@ tlv_init_cursor_from_size( return (tlv_init_cursor(cursor, (uint32_t *)block, limit)); } -static int +static efx_rc_t tlv_require_end( __in tlv_cursor_t *cursor) { uint32_t *pos; - int rc; + efx_rc_t rc; if (cursor->end == NULL) { pos = cursor->current; @@ -286,7 +286,7 @@ tlv_require_end( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -295,7 +295,7 @@ static size_t tlv_block_length_used( __in tlv_cursor_t *cursor) { - int rc; + efx_rc_t rc; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; @@ -309,7 +309,7 @@ tlv_block_length_used( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (0); } @@ -339,7 +339,7 @@ tlv_write( return (ptr); } -static __checkReturn int +static __checkReturn efx_rc_t tlv_insert( __in tlv_cursor_t *cursor, __in uint32_t tag, @@ -347,7 +347,7 @@ tlv_insert( __in size_t size) { unsigned int delta; - int rc; + efx_rc_t rc; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; @@ -385,12 +385,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t tlv_modify( __in tlv_cursor_t *cursor, __in uint32_t tag, @@ -401,7 +401,7 @@ tlv_modify( unsigned int old_ndwords; unsigned int new_ndwords; unsigned int delta; - int rc; + efx_rc_t rc; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; @@ -468,13 +468,13 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* Validate TLV formatted partition contents (before writing to flash) */ - __checkReturn int + __checkReturn efx_rc_t efx_nvram_tlv_validate( __in efx_nic_t *enp, __in uint32_t partn, @@ -487,7 +487,7 @@ efx_nvram_tlv_validate( size_t total_length; uint32_t cksum; int pos; - int rc; + efx_rc_t rc; EFX_STATIC_ASSERT(sizeof (*header) <= HUNTINGTON_NVRAM_CHUNK); @@ -566,7 +566,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -577,7 +577,7 @@ fail1: * be multiple segments in a partition, so seg_offset allows segments * beyond the first to be read. */ -static __checkReturn int +static __checkReturn efx_rc_t hunt_nvram_read_tlv_segment( __in efx_nic_t *enp, __in uint32_t partn, @@ -591,7 +591,7 @@ hunt_nvram_read_tlv_segment( size_t total_length; uint32_t cksum; int pos; - int rc; + efx_rc_t rc; EFX_STATIC_ASSERT(sizeof (*header) <= HUNTINGTON_NVRAM_CHUNK); @@ -695,7 +695,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -704,7 +704,7 @@ fail1: * Read a single TLV item from a host memory * buffer containing a TLV formatted segment. */ - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_buf_read_tlv( __in efx_nic_t *enp, __in_bcount(max_seg_size) caddr_t seg_data, @@ -717,7 +717,7 @@ hunt_nvram_buf_read_tlv( caddr_t data; size_t length; caddr_t value; - int rc; + efx_rc_t rc; if ((seg_data == NULL) || (max_seg_size == 0)) { rc = EINVAL; @@ -761,13 +761,13 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* Read a single TLV item from the first segment in a TLV formatted partition */ - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_read_tlv( __in efx_nic_t *enp, __in uint32_t partn, @@ -780,7 +780,7 @@ hunt_nvram_partn_read_tlv( size_t length; caddr_t data; int retry; - int rc; + efx_rc_t rc; /* Allocate sufficient memory for the entire partition */ if ((rc = hunt_nvram_partn_size(enp, partn, &partn_size)) != 0) @@ -838,19 +838,19 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* Compute the size of a segment. */ - static __checkReturn int + static __checkReturn efx_rc_t hunt_nvram_buf_segment_size( __in caddr_t seg_data, __in size_t max_seg_size, __out size_t *seg_sizep) { - int rc; + efx_rc_t rc; tlv_cursor_t cursor; struct tlv_partition_header *header; struct tlv_partition_trailer *trailer; @@ -968,7 +968,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -977,7 +977,7 @@ fail1: * Add or update a single TLV item in a host memory buffer containing a TLV * formatted segment. Historically partitions consisted of only one segment. */ - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_buf_write_tlv( __inout_bcount(max_seg_size) caddr_t seg_data, __in size_t max_seg_size, @@ -992,7 +992,7 @@ hunt_nvram_buf_write_tlv( uint32_t generation; uint32_t cksum; int pos; - int rc; + efx_rc_t rc; /* A PARTITION_HEADER tag must be the first item (at offset zero) */ if ((rc = tlv_init_cursor_from_size(&cursor, seg_data, @@ -1068,7 +1068,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1078,7 +1078,7 @@ fail1: * dynamic config partition. The first segment is the current active * configuration. */ - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_write_tlv( __in efx_nic_t *enp, __in uint32_t partn, @@ -1094,7 +1094,7 @@ hunt_nvram_partn_write_tlv( * Read a segment from nvram at the given offset into a buffer (segment_data) * and optionally write a new tag to it. */ - static __checkReturn int + static __checkReturn efx_rc_t hunt_nvram_segment_write_tlv( __in efx_nic_t *enp, __in uint32_t partn, @@ -1107,7 +1107,7 @@ hunt_nvram_segment_write_tlv( __inout size_t *dest_remain_lenp, __in boolean_t write) { - int rc; + efx_rc_t rc; int status; size_t original_segment_size; size_t modified_segment_size; @@ -1151,7 +1151,7 @@ hunt_nvram_segment_write_tlv( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1177,7 +1177,7 @@ fail1: * its size to increase, which would overwrite the subsequent segments and * invalidate them. */ - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_write_segment_tlv( __in efx_nic_t *enp, __in uint32_t partn, @@ -1189,7 +1189,7 @@ hunt_nvram_partn_write_segment_tlv( size_t partn_size = 0; caddr_t partn_data; size_t total_length = 0; - int rc; + efx_rc_t rc; size_t current_offset = 0; size_t remaining_original_length; size_t remaining_modified_length; @@ -1278,7 +1278,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1287,13 +1287,13 @@ fail1: * Get the size of a NVRAM partition. This is the total size allocated in nvram, * not the data used by the segments in the partition. */ - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_size( __in efx_nic_t *enp, __in unsigned int partn, __out size_t *sizep) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_nvram_info(enp, partn, sizep, NULL, NULL)) != 0) goto fail1; @@ -1301,17 +1301,17 @@ hunt_nvram_partn_size( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_lock( __in efx_nic_t *enp, __in unsigned int partn) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_nvram_update_start(enp, partn)) != 0) goto fail1; @@ -1319,12 +1319,12 @@ hunt_nvram_partn_lock( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_read( __in efx_nic_t *enp, __in unsigned int partn, @@ -1333,7 +1333,7 @@ hunt_nvram_partn_read( __in size_t size) { size_t chunk; - int rc; + efx_rc_t rc; while (size > 0) { chunk = MIN(size, HUNTINGTON_NVRAM_CHUNK); @@ -1351,19 +1351,19 @@ hunt_nvram_partn_read( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_erase( __in efx_nic_t *enp, __in unsigned int partn, __in unsigned int offset, __in size_t size) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_nvram_erase(enp, partn, offset, size)) != 0) goto fail1; @@ -1371,12 +1371,12 @@ hunt_nvram_partn_erase( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_write( __in efx_nic_t *enp, __in unsigned int partn, @@ -1385,7 +1385,7 @@ hunt_nvram_partn_write( __in size_t size) { size_t chunk; - int rc; + efx_rc_t rc; while (size > 0) { chunk = MIN(size, HUNTINGTON_NVRAM_CHUNK); @@ -1403,7 +1403,7 @@ hunt_nvram_partn_write( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1414,7 +1414,7 @@ hunt_nvram_partn_unlock( __in unsigned int partn) { boolean_t reboot; - int rc; + efx_rc_t rc; reboot = B_FALSE; if ((rc = efx_mcdi_nvram_update_finish(enp, partn, reboot)) != 0) @@ -1423,10 +1423,10 @@ hunt_nvram_partn_unlock( return; fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_partn_set_version( __in efx_nic_t *enp, __in unsigned int partn, @@ -1434,7 +1434,7 @@ hunt_nvram_partn_set_version( { struct tlv_partition_version partn_version; size_t size; - int rc; + efx_rc_t rc; /* Add or modify partition version TLV item */ partn_version.version_w = __CPU_TO_LE_16(version[0]); @@ -1454,7 +1454,7 @@ hunt_nvram_partn_set_version( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1517,7 +1517,7 @@ hunt_parttbl_entry( #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_test( __in efx_nic_t *enp) { @@ -1528,7 +1528,7 @@ hunt_nvram_test( size_t size; int i; unsigned int j; - int rc; + efx_rc_t rc; /* Find supported partitions */ size = MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MAXNUM * sizeof (uint32_t); @@ -1571,13 +1571,13 @@ fail2: EFSYS_PROBE(fail2); EFSYS_KMEM_FREE(enp->en_esip, size, partns); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_DIAG */ - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1585,7 +1585,7 @@ hunt_nvram_size( { hunt_parttbl_entry_t *entry; uint32_t partn; - int rc; + efx_rc_t rc; if ((entry = hunt_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -1601,14 +1601,14 @@ hunt_nvram_size( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); *sizep = 0; return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1617,7 +1617,7 @@ hunt_nvram_get_version( { hunt_parttbl_entry_t *entry; uint32_t partn; - int rc; + efx_rc_t rc; if ((entry = hunt_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -1637,12 +1637,12 @@ hunt_nvram_get_version( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1650,7 +1650,7 @@ hunt_nvram_rw_start( { hunt_parttbl_entry_t *entry; uint32_t partn; - int rc; + efx_rc_t rc; if ((entry = hunt_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -1669,12 +1669,12 @@ hunt_nvram_rw_start( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1683,7 +1683,7 @@ hunt_nvram_read_chunk( __in size_t size) { hunt_parttbl_entry_t *entry; - int rc; + efx_rc_t rc; if ((entry = hunt_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -1699,19 +1699,19 @@ hunt_nvram_read_chunk( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type) { hunt_parttbl_entry_t *entry; size_t size; - int rc; + efx_rc_t rc; if ((entry = hunt_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -1731,12 +1731,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1745,7 +1745,7 @@ hunt_nvram_write_chunk( __in size_t size) { hunt_parttbl_entry_t *entry; - int rc; + efx_rc_t rc; if ((entry = hunt_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -1761,7 +1761,7 @@ hunt_nvram_write_chunk( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -1777,7 +1777,7 @@ hunt_nvram_rw_finish( hunt_nvram_partn_unlock(enp, entry->partn); } - __checkReturn int + __checkReturn efx_rc_t hunt_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1785,7 +1785,7 @@ hunt_nvram_set_version( { hunt_parttbl_entry_t *entry; unsigned int partn; - int rc; + efx_rc_t rc; if ((entry = hunt_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -1802,7 +1802,7 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/hunt_phy.c b/sys/dev/sfxge/common/hunt_phy.c index 3de4ba5c3102..e8d234aa9ed6 100644 --- a/sys/dev/sfxge/common/hunt_phy.c +++ b/sys/dev/sfxge/common/hunt_phy.c @@ -191,14 +191,14 @@ hunt_phy_link_ev( *link_modep = link_mode; } - __checkReturn int + __checkReturn efx_rc_t hunt_phy_power( __in efx_nic_t *enp, __in boolean_t power) { /* TBD: consider common Siena/Hunt function: essentially identical */ - int rc; + efx_rc_t rc; if (!power) return (0); @@ -212,12 +212,12 @@ hunt_phy_power( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_phy_get_link( __in efx_nic_t *enp, __out hunt_link_state_t *hlsp) @@ -231,7 +231,7 @@ hunt_phy_get_link( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_LINK_IN_LEN, MC_CMD_GET_LINK_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_LINK; @@ -293,12 +293,12 @@ hunt_phy_get_link( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_phy_reconfigure( __in efx_nic_t *enp) { @@ -316,7 +316,7 @@ hunt_phy_reconfigure( uint32_t cap_mask; unsigned int led_mode; unsigned int speed; - int rc; + efx_rc_t rc; if (~encp->enc_func_flags & EFX_NIC_FUNC_LINKCTRL) goto out; @@ -423,12 +423,12 @@ out: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_phy_verify( __in efx_nic_t *enp) { @@ -438,7 +438,7 @@ hunt_phy_verify( uint8_t payload[MAX(MC_CMD_GET_PHY_STATE_IN_LEN, MC_CMD_GET_PHY_STATE_OUT_LEN)]; uint32_t state; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_PHY_STATE; @@ -474,12 +474,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip) @@ -491,7 +491,7 @@ hunt_phy_oui_get( #if EFSYS_OPT_PHY_STATS - __checkReturn int + __checkReturn efx_rc_t hunt_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -522,7 +522,7 @@ hunt_phy_prop_name( #endif /* EFSYS_OPT_NAMES */ -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, @@ -534,7 +534,7 @@ hunt_phy_prop_get( return (ENOTSUP); } -extern __checkReturn int +extern __checkReturn efx_rc_t hunt_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, @@ -549,11 +549,11 @@ hunt_phy_prop_set( #if EFSYS_OPT_BIST - __checkReturn int + __checkReturn efx_rc_t hunt_bist_enable_offline( __in efx_nic_t *enp) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_bist_enable_offline(enp)) != 0) goto fail1; @@ -561,17 +561,17 @@ hunt_bist_enable_offline( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_bist_start(enp, type)) != 0) goto fail1; @@ -579,12 +579,12 @@ hunt_bist_start( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, @@ -601,7 +601,7 @@ hunt_bist_poll( MCDI_CTL_SDU_LEN_MAX)]; uint32_t value_mask = 0; uint32_t result; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_POLL_BIST; @@ -682,7 +682,7 @@ hunt_bist_poll( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/hunt_rx.c b/sys/dev/sfxge/common/hunt_rx.c index 991f29300b06..e173a23bf5e2 100644 --- a/sys/dev/sfxge/common/hunt_rx.c +++ b/sys/dev/sfxge/common/hunt_rx.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_HUNTINGTON -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_init_rxq( __in efx_nic_t *enp, __in uint32_t size, @@ -56,7 +56,7 @@ efx_mcdi_init_rxq( int i; efx_qword_t *dma_addr; uint64_t addr; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(size, <=, EFX_RXQ_MAXNDESCS); @@ -102,12 +102,12 @@ efx_mcdi_init_rxq( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_fini_rxq( __in efx_nic_t *enp, __in uint32_t instance) @@ -115,7 +115,7 @@ efx_mcdi_fini_rxq( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_FINI_RXQ_IN_LEN, MC_CMD_FINI_RXQ_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_FINI_RXQ; @@ -136,13 +136,13 @@ efx_mcdi_fini_rxq( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #if EFSYS_OPT_RX_SCALE -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_rss_context_alloc( __in efx_nic_t *enp, __out uint32_t *rss_contextp) @@ -151,7 +151,7 @@ efx_mcdi_rss_context_alloc( uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_ALLOC_IN_LEN, MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN)]; uint32_t rss_context; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_RSS_CONTEXT_ALLOC; @@ -194,14 +194,14 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCALE -static int +static efx_rc_t efx_mcdi_rss_context_free( __in efx_nic_t *enp, __in uint32_t rss_context) @@ -209,7 +209,7 @@ efx_mcdi_rss_context_free( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_FREE_IN_LEN, MC_CMD_RSS_CONTEXT_FREE_OUT_LEN)]; - int rc; + efx_rc_t rc; if (rss_context == HUNTINGTON_RSS_CONTEXT_INVALID) { rc = EINVAL; @@ -237,14 +237,14 @@ efx_mcdi_rss_context_free( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCALE -static int +static efx_rc_t efx_mcdi_rss_context_set_flags( __in efx_nic_t *enp, __in uint32_t rss_context, @@ -253,7 +253,7 @@ efx_mcdi_rss_context_set_flags( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_LEN, MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT_LEN)]; - int rc; + efx_rc_t rc; if (rss_context == HUNTINGTON_RSS_CONTEXT_INVALID) { rc = EINVAL; @@ -292,14 +292,14 @@ efx_mcdi_rss_context_set_flags( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCALE -static int +static efx_rc_t efx_mcdi_rss_context_set_key( __in efx_nic_t *enp, __in uint32_t rss_context, @@ -309,7 +309,7 @@ efx_mcdi_rss_context_set_key( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_SET_KEY_IN_LEN, MC_CMD_RSS_CONTEXT_SET_KEY_OUT_LEN)]; - int rc; + efx_rc_t rc; if (rss_context == HUNTINGTON_RSS_CONTEXT_INVALID) { rc = EINVAL; @@ -349,14 +349,14 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCALE -static int +static efx_rc_t efx_mcdi_rss_context_set_table( __in efx_nic_t *enp, __in uint32_t rss_context, @@ -405,14 +405,14 @@ efx_mcdi_rss_context_set_table( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ - __checkReturn int + __checkReturn efx_rc_t hunt_rx_init( __in efx_nic_t *enp) { @@ -441,13 +441,13 @@ hunt_rx_init( } #if EFSYS_OPT_RX_HDR_SPLIT - __checkReturn int + __checkReturn efx_rc_t hunt_rx_hdr_split_enable( __in efx_nic_t *enp, __in unsigned int hdr_buf_size, __in unsigned int pld_buf_size) { - int rc; + efx_rc_t rc; /* FIXME */ _NOTE(ARGUNUSED(enp, hdr_buf_size, pld_buf_size)) @@ -460,14 +460,14 @@ hunt_rx_hdr_split_enable( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_HDR_SPLIT */ #if EFSYS_OPT_RX_SCATTER - __checkReturn int + __checkReturn efx_rc_t hunt_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size) @@ -478,14 +478,14 @@ hunt_rx_scatter_enable( #endif /* EFSYS_OPT_RX_SCATTER */ #if EFSYS_OPT_RX_SCALE - __checkReturn int + __checkReturn efx_rc_t hunt_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, __in efx_rx_hash_type_t type, __in boolean_t insert) { - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(alg, ==, EFX_RX_HASHALG_TOEPLITZ); EFSYS_ASSERT3U(insert, ==, B_TRUE); @@ -511,20 +511,20 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCALE - __checkReturn int + __checkReturn efx_rc_t hunt_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, __in size_t n) { - int rc; + efx_rc_t rc; if (enp->en_rss_support == EFX_RX_SCALE_UNAVAILABLE) { rc = ENOTSUP; @@ -540,20 +540,20 @@ hunt_rx_scale_key_set( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCALE - __checkReturn int + __checkReturn efx_rc_t hunt_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, __in size_t n) { - int rc; + efx_rc_t rc; if (enp->en_rss_support == EFX_RX_SCALE_UNAVAILABLE) { rc = ENOTSUP; @@ -569,7 +569,7 @@ hunt_rx_scale_tbl_set( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -644,12 +644,12 @@ hunt_rx_qpush( erp->er_index, &dword, B_FALSE); } - __checkReturn int + __checkReturn efx_rc_t hunt_rx_qflush( __in efx_rxq_t *erp) { efx_nic_t *enp = erp->er_enp; - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_fini_rxq(enp, erp->er_index)) != 0) goto fail1; @@ -657,7 +657,7 @@ hunt_rx_qflush( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -671,7 +671,7 @@ hunt_rx_qenable( /* FIXME */ } - __checkReturn int + __checkReturn efx_rc_t hunt_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -684,7 +684,7 @@ hunt_rx_qcreate( __in efx_rxq_t *erp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); - int rc; + efx_rc_t rc; _NOTE(ARGUNUSED(erp)) @@ -726,7 +726,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/hunt_sram.c b/sys/dev/sfxge/common/hunt_sram.c index 947e033ef7e6..9eb14805a72b 100644 --- a/sys/dev/sfxge/common/hunt_sram.c +++ b/sys/dev/sfxge/common/hunt_sram.c @@ -40,12 +40,12 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t hunt_sram_test( __in efx_nic_t *enp, __in efx_sram_pattern_fn_t func) { - int rc; + efx_rc_t rc; /* FIXME */ _NOTE(ARGUNUSED(enp)) @@ -59,7 +59,7 @@ hunt_sram_test( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/hunt_tx.c b/sys/dev/sfxge/common/hunt_tx.c index ee5691ac49db..910ee2e3f770 100755 --- a/sys/dev/sfxge/common/hunt_tx.c +++ b/sys/dev/sfxge/common/hunt_tx.c @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #define EFX_TX_QSTAT_INCR(_etp, _stat) #endif -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_init_txq( __in efx_nic_t *enp, __in uint32_t size, @@ -65,7 +65,7 @@ efx_mcdi_init_txq( uint64_t addr; int npages; int i; - int rc; + efx_rc_t rc; EFSYS_ASSERT(EFX_TXQ_MAX_BUFS >= EFX_TXQ_NBUFS(EFX_TXQ_MAXNDESCS(&enp->en_nic_cfg))); @@ -123,12 +123,12 @@ efx_mcdi_init_txq( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_fini_txq( __in efx_nic_t *enp, __in uint32_t instance) @@ -136,7 +136,7 @@ efx_mcdi_fini_txq( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_FINI_TXQ_IN_LEN, MC_CMD_FINI_TXQ_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_FINI_TXQ; @@ -157,12 +157,12 @@ efx_mcdi_fini_txq( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_init( __in efx_nic_t *enp) { @@ -177,7 +177,7 @@ hunt_tx_fini( _NOTE(ARGUNUSED(enp)) } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -191,7 +191,7 @@ hunt_tx_qcreate( __out unsigned int *addedp) { efx_qword_t desc; - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_init_txq(enp, n, eep->ee_index, label, index, flags, @@ -219,7 +219,7 @@ hunt_tx_qcreate( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -233,13 +233,13 @@ hunt_tx_qdestroy( /* FIXME */ } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_qpio_enable( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; efx_piobuf_handle_t handle; - int rc; + efx_rc_t rc; if (etp->et_pio_size != 0) { rc = EALREADY; @@ -284,7 +284,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -306,7 +306,7 @@ hunt_tx_qpio_disable( } } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_qpio_write( __in efx_txq_t *etp, __in_ecount(length) uint8_t *buffer, @@ -318,7 +318,7 @@ hunt_tx_qpio_write( uint32_t write_offset; uint32_t write_offset_limit; efx_qword_t *eqp; - int rc; + efx_rc_t rc; EFSYS_ASSERT(length % sizeof (efx_qword_t) == 0); @@ -349,12 +349,12 @@ hunt_tx_qpio_write( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_qpio_post( __in efx_txq_t *etp, __in size_t pkt_length, @@ -365,7 +365,7 @@ hunt_tx_qpio_post( unsigned int id; size_t offset; unsigned int added = *addedp; - int rc; + efx_rc_t rc; if (added - completed + 1 > EFX_TXQ_LIMIT(etp->et_mask + 1)) { @@ -402,12 +402,12 @@ hunt_tx_qpio_post( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, @@ -417,7 +417,7 @@ hunt_tx_qpost( { unsigned int added = *addedp; unsigned int i; - int rc; + efx_rc_t rc; if (added - completed + n > EFX_TXQ_LIMIT(etp->et_mask + 1)) { rc = ENOSPC; @@ -459,7 +459,7 @@ hunt_tx_qpost( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -499,7 +499,7 @@ hunt_tx_qpush( &oword); } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, @@ -509,7 +509,7 @@ hunt_tx_qdesc_post( { unsigned int added = *addedp; unsigned int i; - int rc; + efx_rc_t rc; if (added - completed + n > EFX_TXQ_LIMIT(etp->et_mask + 1)) { rc = ENOSPC; @@ -536,7 +536,7 @@ hunt_tx_qdesc_post( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -603,12 +603,12 @@ hunt_tx_qdesc_vlantci_create( } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns) { - int rc; + efx_rc_t rc; /* FIXME */ _NOTE(ARGUNUSED(etp, ns)) @@ -621,17 +621,17 @@ hunt_tx_qpace( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_tx_qflush( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_fini_txq(enp, etp->et_index)) != 0) goto fail1; @@ -639,7 +639,7 @@ hunt_tx_qflush( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/hunt_vpd.c b/sys/dev/sfxge/common/hunt_vpd.c index bc814cf99a68..1b3f86b77d42 100644 --- a/sys/dev/sfxge/common/hunt_vpd.c +++ b/sys/dev/sfxge/common/hunt_vpd.c @@ -44,14 +44,14 @@ __FBSDID("$FreeBSD$"); #include "ef10_tlv_layout.h" - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_init( __in efx_nic_t *enp) { caddr_t svpd; size_t svpd_size; uint32_t pci_pf; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -92,17 +92,17 @@ fail2: EFSYS_KMEM_FREE(enp->en_esip, svpd_size, svpd); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_size( __in efx_nic_t *enp, __out size_t *sizep) { - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -119,12 +119,12 @@ hunt_vpd_size( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, @@ -133,7 +133,7 @@ hunt_vpd_read( caddr_t dvpd; size_t dvpd_size; uint32_t pci_pf; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -163,12 +163,12 @@ fail2: EFSYS_KMEM_FREE(enp->en_esip, dvpd_size, dvpd); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -180,7 +180,7 @@ hunt_vpd_verify( efx_vpd_keyword_t dkey; unsigned int scont; unsigned int dcont; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -237,19 +237,19 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size) { boolean_t wantpid; - int rc; + efx_rc_t rc; /* * Only create an ID string if the dynamic cfg doesn't have one @@ -279,12 +279,12 @@ hunt_vpd_reinit( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -293,7 +293,7 @@ hunt_vpd_get( { unsigned int offset; uint8_t length; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -323,19 +323,19 @@ hunt_vpd_get( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_set( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp) { - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -360,12 +360,12 @@ hunt_vpd_set( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_next( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -378,7 +378,7 @@ hunt_vpd_next( return (ENOTSUP); } - __checkReturn int + __checkReturn efx_rc_t hunt_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -386,7 +386,7 @@ hunt_vpd_write( { size_t vpd_length; uint32_t pci_pf; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); @@ -410,7 +410,7 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/mcdi_mon.c b/sys/dev/sfxge/common/mcdi_mon.c index 03b85acd1f62..f8b1681e55b4 100644 --- a/sys/dev/sfxge/common/mcdi_mon.c +++ b/sys/dev/sfxge/common/mcdi_mon.c @@ -245,7 +245,7 @@ mcdi_mon_decode_stats( } } - __checkReturn int + __checkReturn efx_rc_t mcdi_mon_ev( __in efx_nic_t *enp, __in efx_qword_t *eqp, @@ -259,7 +259,7 @@ mcdi_mon_ev( uint16_t state; uint16_t value; efx_mon_stat_t id; - int rc; + efx_rc_t rc; port_mask = (emip->emi_port == 1) ? MCDI_MON_PORT_P1 @@ -293,13 +293,13 @@ mcdi_mon_ev( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_read_sensors( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -328,7 +328,7 @@ efx_mcdi_read_sensors( return (req.emr_rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_sensor_info_npages( __in efx_nic_t *enp, __out uint32_t *npagesp) @@ -337,7 +337,7 @@ efx_mcdi_sensor_info_npages( uint8_t payload[MAX(MC_CMD_SENSOR_INFO_EXT_IN_LEN, MC_CMD_SENSOR_INFO_OUT_LENMAX)]; int page; - int rc; + efx_rc_t rc; EFSYS_ASSERT(npagesp != NULL); @@ -366,12 +366,12 @@ efx_mcdi_sensor_info_npages( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t efx_mcdi_sensor_info( __in efx_nic_t *enp, __out_ecount(npages) uint32_t *sensor_maskp, @@ -381,7 +381,7 @@ efx_mcdi_sensor_info( uint8_t payload[MAX(MC_CMD_SENSOR_INFO_EXT_IN_LEN, MC_CMD_SENSOR_INFO_OUT_LENMAX)]; uint32_t page; - int rc; + efx_rc_t rc; EFSYS_ASSERT(sensor_maskp != NULL); @@ -426,12 +426,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t mcdi_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -439,7 +439,7 @@ mcdi_mon_stats_update( { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t size = encp->enc_mon_stat_dma_buf_size; - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_read_sensors(enp, esmp, size)) != 0) goto fail1; @@ -454,18 +454,18 @@ mcdi_mon_stats_update( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t mcdi_mon_cfg_build( __in efx_nic_t *enp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t npages; - int rc; + efx_rc_t rc; switch (enp->en_family) { #if EFSYS_OPT_SIENA @@ -528,7 +528,7 @@ fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/mcdi_mon.h b/sys/dev/sfxge/common/mcdi_mon.h index f948852f5d08..440a8875f776 100644 --- a/sys/dev/sfxge/common/mcdi_mon.h +++ b/sys/dev/sfxge/common/mcdi_mon.h @@ -43,7 +43,7 @@ extern "C" { #if EFSYS_OPT_MON_STATS - __checkReturn int + __checkReturn efx_rc_t mcdi_mon_cfg_build( __in efx_nic_t *enp); @@ -52,14 +52,14 @@ mcdi_mon_cfg_free( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t mcdi_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 +extern __checkReturn efx_rc_t mcdi_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, diff --git a/sys/dev/sfxge/common/siena_impl.h b/sys/dev/sfxge/common/siena_impl.h index c9f7a4a30a54..ca107599e751 100644 --- a/sys/dev/sfxge/common/siena_impl.h +++ b/sys/dev/sfxge/common/siena_impl.h @@ -55,29 +55,29 @@ typedef enum siena_phy_prop_e { #define SIENA_NVRAM_CHUNK 0x80 -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nic_probe( __in efx_nic_t *enp); #if EFSYS_OPT_PCIE_TUNE -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nic_pcie_extended_sync( __in efx_nic_t *enp); #endif -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nic_reset( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nic_init( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nic_register_test( __in efx_nic_t *enp); @@ -99,7 +99,7 @@ siena_sram_init( #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t siena_sram_test( __in efx_nic_t *enp, __in efx_sram_pattern_fn_t func); @@ -108,7 +108,7 @@ siena_sram_test( #if EFSYS_OPT_MCDI -extern __checkReturn int +extern __checkReturn efx_rc_t siena_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp); @@ -130,7 +130,7 @@ siena_mcdi_request_copyout( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp); -extern int +extern efx_rc_t siena_mcdi_poll_reboot( __in efx_nic_t *enp); @@ -138,12 +138,12 @@ extern void siena_mcdi_fini( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_mcdi_fw_update_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); @@ -152,18 +152,18 @@ siena_mcdi_macaddr_change_supported( #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_partn_size( __in efx_nic_t *enp, __in unsigned int partn, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_partn_lock( __in efx_nic_t *enp, __in unsigned int partn); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_partn_read( __in efx_nic_t *enp, __in unsigned int partn, @@ -171,14 +171,14 @@ siena_nvram_partn_read( __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_partn_erase( __in efx_nic_t *enp, __in unsigned int partn, __in unsigned int offset, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_partn_write( __in efx_nic_t *enp, __in unsigned int partn, @@ -191,7 +191,7 @@ siena_nvram_partn_unlock( __in efx_nic_t *enp, __in unsigned int partn); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_get_dynamic_cfg( __in efx_nic_t *enp, __in unsigned int index, @@ -205,38 +205,38 @@ siena_nvram_get_dynamic_cfg( #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_get_subtype( __in efx_nic_t *enp, __in unsigned int partn, __out uint32_t *subtypep); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4]); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *pref_chunkp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -244,12 +244,12 @@ siena_nvram_read_chunk( __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -262,7 +262,7 @@ siena_nvram_rw_finish( __in efx_nic_t *enp, __in efx_nvram_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -272,48 +272,48 @@ siena_nvram_set_version( #if EFSYS_OPT_VPD -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_init( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_size( __in efx_nic_t *enp, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __inout efx_vpd_value_t *evvp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_set( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_next( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -321,7 +321,7 @@ siena_vpd_next( __out efx_vpd_value_t *evvp, __inout unsigned int *contp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -350,25 +350,25 @@ siena_phy_link_ev( __in efx_qword_t *eqp, __out efx_link_mode_t *link_modep); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_get_link( __in efx_nic_t *enp, __out siena_link_state_t *slsp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_power( __in efx_nic_t *enp, __in boolean_t on); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_reconfigure( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_verify( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip); @@ -383,7 +383,7 @@ siena_phy_decode_stats( __out_opt uint64_t *smaskp, __inout_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -402,14 +402,14 @@ siena_phy_prop_name( #endif /* EFSYS_OPT_NAMES */ -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t flags, __out uint32_t *valp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, @@ -419,12 +419,12 @@ siena_phy_prop_set( #if EFSYS_OPT_BIST -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, @@ -442,23 +442,23 @@ siena_phy_bist_stop( #endif /* EFSYS_OPT_BIST */ -extern __checkReturn int +extern __checkReturn efx_rc_t siena_mac_poll( __in efx_nic_t *enp, __out efx_link_mode_t *link_modep); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp); -extern __checkReturn int +extern __checkReturn efx_rc_t siena_mac_reconfigure( __in efx_nic_t *enp); #if EFSYS_OPT_LOOPBACK -extern __checkReturn int +extern __checkReturn efx_rc_t siena_mac_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, @@ -468,7 +468,7 @@ siena_mac_loopback_set( #if EFSYS_OPT_MAC_STATS -extern __checkReturn int +extern __checkReturn efx_rc_t siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, diff --git a/sys/dev/sfxge/common/siena_mac.c b/sys/dev/sfxge/common/siena_mac.c index 5fd561004b0d..ff8e11a9053a 100644 --- a/sys/dev/sfxge/common/siena_mac.c +++ b/sys/dev/sfxge/common/siena_mac.c @@ -37,14 +37,14 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_SIENA - __checkReturn int + __checkReturn efx_rc_t siena_mac_poll( __in efx_nic_t *enp, __out efx_link_mode_t *link_modep) { efx_port_t *epp = &(enp->en_port); siena_link_state_t sls; - int rc; + efx_rc_t rc; if ((rc = siena_phy_get_link(enp, &sls)) != 0) goto fail1; @@ -57,20 +57,20 @@ siena_mac_poll( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); *link_modep = EFX_LINK_UNKNOWN; return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp) { siena_link_state_t sls; - int rc; + efx_rc_t rc; /* * Because Siena doesn't *require* polling, we can't rely on @@ -84,12 +84,12 @@ siena_mac_up( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_mac_reconfigure( __in efx_nic_t *enp) { @@ -101,7 +101,7 @@ siena_mac_reconfigure( MAX(MC_CMD_SET_MCAST_HASH_IN_LEN, MC_CMD_SET_MCAST_HASH_OUT_LEN))]; unsigned int fcntl; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_SET_MAC; @@ -184,14 +184,14 @@ siena_mac_reconfigure( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #if EFSYS_OPT_LOOPBACK - __checkReturn int + __checkReturn efx_rc_t siena_mac_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, @@ -201,7 +201,7 @@ siena_mac_loopback_set( efx_phy_ops_t *epop = epp->ep_epop; efx_loopback_type_t old_loopback_type; efx_link_mode_t old_loopback_link_mode; - int rc; + efx_rc_t rc; /* The PHY object handles this on Siena */ old_loopback_type = epp->ep_loopback_type; @@ -230,7 +230,7 @@ fail1: #define SIENA_MAC_STAT_READ(_esmp, _field, _eqp) \ EFSYS_MEM_READQ((_esmp), (_field) * sizeof (efx_qword_t), _eqp) - __checkReturn int + __checkReturn efx_rc_t siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, diff --git a/sys/dev/sfxge/common/siena_mcdi.c b/sys/dev/sfxge/common/siena_mcdi.c index b2224acdef70..47eea0e37c25 100644 --- a/sys/dev/sfxge/common/siena_mcdi.c +++ b/sys/dev/sfxge/common/siena_mcdi.c @@ -126,7 +126,7 @@ siena_mcdi_request_copyout( } } - int + efx_rc_t siena_mcdi_poll_reboot( __in efx_nic_t *enp) { @@ -174,7 +174,7 @@ siena_mcdi_request_poll( unsigned int seq; unsigned int length; int state; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA); @@ -266,7 +266,7 @@ fail2: EFSYS_PROBE(fail2); fail1: if (!emrp->emr_quiet) - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); /* Fill out error state */ emrp->emr_rc = rc; @@ -280,7 +280,7 @@ out: return (B_TRUE); } - __checkReturn int + __checkReturn efx_rc_t siena_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp) @@ -288,7 +288,7 @@ siena_mcdi_init( efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); efx_oword_t oword; unsigned int portnum; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -316,7 +316,7 @@ siena_mcdi_init( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -327,7 +327,7 @@ siena_mcdi_fini( { } - __checkReturn int + __checkReturn efx_rc_t siena_mcdi_fw_update_supported( __in efx_nic_t *enp, __out boolean_t *supportedp) @@ -339,7 +339,7 @@ siena_mcdi_fw_update_supported( return (0); } - __checkReturn int + __checkReturn efx_rc_t siena_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp) diff --git a/sys/dev/sfxge/common/siena_nic.c b/sys/dev/sfxge/common/siena_nic.c index 3dcf48ec6cdb..6652f1e84d19 100644 --- a/sys/dev/sfxge/common/siena_nic.c +++ b/sys/dev/sfxge/common/siena_nic.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t siena_nic_get_partn_mask( __in efx_nic_t *enp, __out unsigned int *maskp) @@ -46,7 +46,7 @@ siena_nic_get_partn_mask( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_NVRAM_TYPES_IN_LEN, MC_CMD_NVRAM_TYPES_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_NVRAM_TYPES; @@ -74,18 +74,18 @@ siena_nic_get_partn_mask( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #if EFSYS_OPT_PCIE_TUNE - __checkReturn int + __checkReturn efx_rc_t siena_nic_pcie_extended_sync( __in efx_nic_t *enp) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_set_workaround(enp, MC_CMD_WORKAROUND_BUG17230, B_TRUE, NULL) != 0)) @@ -94,14 +94,14 @@ siena_nic_pcie_extended_sync( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_PCIE_TUNE */ -static __checkReturn int +static __checkReturn efx_rc_t siena_board_cfg( __in efx_nic_t *enp) { @@ -110,7 +110,7 @@ siena_board_cfg( efx_dword_t capabilities; uint32_t board_type; uint32_t nevq, nrxq, ntxq; - int rc; + efx_rc_t rc; /* External port identifier using one-based port numbering */ encp->enc_external_port = (uint8_t)enp->en_mcdi.em_emip.emi_port; @@ -176,17 +176,17 @@ siena_board_cfg( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -static __checkReturn int +static __checkReturn efx_rc_t siena_phy_cfg( __in efx_nic_t *enp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); - int rc; + efx_rc_t rc; /* Fill out fields in enp->en_port and enp->en_nic_cfg from MCDI */ if ((rc = efx_mcdi_get_phy_cfg(enp)) != 0) @@ -201,12 +201,12 @@ siena_phy_cfg( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nic_probe( __in efx_nic_t *enp) { @@ -215,7 +215,7 @@ siena_nic_probe( siena_link_state_t sls; unsigned int mask; efx_oword_t oword; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA); @@ -314,17 +314,17 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nic_reset( __in efx_nic_t *enp) { efx_mcdi_req_t req; - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA); @@ -360,7 +360,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (0); } @@ -395,11 +395,11 @@ siena_nic_usrev_dis( EFX_BAR_WRITEO(enp, FR_CZ_USR_EV_CFG, &oword); } - __checkReturn int + __checkReturn efx_rc_t siena_nic_init( __in efx_nic_t *enp) { - int rc; + efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA); @@ -424,7 +424,7 @@ siena_nic_init( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -506,7 +506,7 @@ static const uint32_t __siena_table_masks[] = { 0xFFFF07FF, 0xFFFFFFFF, 0x0000007F, 0x00000000, }; - __checkReturn int + __checkReturn efx_rc_t siena_nic_register_test( __in efx_nic_t *enp) { @@ -514,7 +514,7 @@ siena_nic_register_test( const uint32_t *dwordp; unsigned int nitems; unsigned int count; - int rc; + efx_rc_t rc; /* Fill out the register mask entries */ EFX_STATIC_ASSERT(EFX_ARRAY_SIZE(__siena_register_masks) @@ -571,7 +571,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/siena_nvram.c b/sys/dev/sfxge/common/siena_nvram.c index 7d20ec0f36e1..7eaceee7a64f 100644 --- a/sys/dev/sfxge/common/siena_nvram.c +++ b/sys/dev/sfxge/common/siena_nvram.c @@ -41,13 +41,13 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_VPD || EFSYS_OPT_NVRAM - __checkReturn int + __checkReturn efx_rc_t siena_nvram_partn_size( __in efx_nic_t *enp, __in unsigned int partn, __out size_t *sizep) { - int rc; + efx_rc_t rc; if ((1 << partn) & ~enp->en_u.siena.enu_partn_mask) { rc = ENOTSUP; @@ -63,17 +63,17 @@ siena_nvram_partn_size( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_partn_lock( __in efx_nic_t *enp, __in unsigned int partn) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_nvram_update_start(enp, partn)) != 0) { goto fail1; @@ -82,12 +82,12 @@ siena_nvram_partn_lock( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_partn_read( __in efx_nic_t *enp, __in unsigned int partn, @@ -96,7 +96,7 @@ siena_nvram_partn_read( __in size_t size) { size_t chunk; - int rc; + efx_rc_t rc; while (size > 0) { chunk = MIN(size, SIENA_NVRAM_CHUNK); @@ -114,19 +114,19 @@ siena_nvram_partn_read( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_partn_erase( __in efx_nic_t *enp, __in unsigned int partn, __in unsigned int offset, __in size_t size) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_nvram_erase(enp, partn, offset, size)) != 0) { goto fail1; @@ -135,12 +135,12 @@ siena_nvram_partn_erase( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_partn_write( __in efx_nic_t *enp, __in unsigned int partn, @@ -149,7 +149,7 @@ siena_nvram_partn_write( __in size_t size) { size_t chunk; - int rc; + efx_rc_t rc; while (size > 0) { chunk = MIN(size, SIENA_NVRAM_CHUNK); @@ -167,7 +167,7 @@ siena_nvram_partn_write( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -178,7 +178,7 @@ siena_nvram_partn_unlock( __in unsigned int partn) { boolean_t reboot; - int rc; + efx_rc_t rc; /* * Reboot into the new image only for PHYs. The driver has to @@ -195,7 +195,7 @@ siena_nvram_partn_unlock( return; fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); } #endif /* EFSYS_OPT_VPD || EFSYS_OPT_NVRAM */ @@ -254,14 +254,14 @@ siena_parttbl_entry( #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t siena_nvram_test( __in efx_nic_t *enp) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); siena_parttbl_entry_t *entry; unsigned int i; - int rc; + efx_rc_t rc; /* * Iterate over the list of supported partition types @@ -282,21 +282,21 @@ siena_nvram_test( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_DIAG */ - __checkReturn int + __checkReturn efx_rc_t siena_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep) { siena_parttbl_entry_t *entry; - int rc; + efx_rc_t rc; if ((entry = siena_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -311,7 +311,7 @@ siena_nvram_size( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); *sizep = 0; @@ -322,7 +322,7 @@ fail1: (sizeof (siena_mc_dynamic_config_hdr_t) + ((_nitems) * \ sizeof (((siena_mc_dynamic_config_hdr_t *)NULL)->fw_version[0]))) - __checkReturn int + __checkReturn efx_rc_t siena_nvram_get_dynamic_cfg( __in efx_nic_t *enp, __in unsigned int partn, @@ -339,7 +339,7 @@ siena_nvram_get_dynamic_cfg( unsigned int nversions; unsigned int pos; unsigned int region; - int rc; + efx_rc_t rc; EFSYS_ASSERT(partn == MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT0 || partn == MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT1); @@ -446,12 +446,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_get_subtype( __in efx_nic_t *enp, __in unsigned int partn, @@ -461,7 +461,7 @@ siena_nvram_get_subtype( uint8_t payload[MAX(MC_CMD_GET_BOARD_CFG_IN_LEN, MC_CMD_GET_BOARD_CFG_OUT_LENMAX)]; efx_word_t *fw_list; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_BOARD_CFG; @@ -500,12 +500,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -517,7 +517,7 @@ siena_nvram_get_version( unsigned int dcfg_partn; unsigned int partn; unsigned int i; - int rc; + efx_rc_t rc; if ((entry = siena_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -593,19 +593,19 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *chunk_sizep) { siena_parttbl_entry_t *entry; - int rc; + efx_rc_t rc; if ((entry = siena_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -623,12 +623,12 @@ siena_nvram_rw_start( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -637,7 +637,7 @@ siena_nvram_read_chunk( __in size_t size) { siena_parttbl_entry_t *entry; - int rc; + efx_rc_t rc; if ((entry = siena_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -653,19 +653,19 @@ siena_nvram_read_chunk( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type) { siena_parttbl_entry_t *entry; size_t size; - int rc; + efx_rc_t rc; if ((entry = siena_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -685,12 +685,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -699,7 +699,7 @@ siena_nvram_write_chunk( __in size_t size) { siena_parttbl_entry_t *entry; - int rc; + efx_rc_t rc; if ((entry = siena_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -715,7 +715,7 @@ siena_nvram_write_chunk( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -731,7 +731,7 @@ siena_nvram_rw_finish( siena_nvram_partn_unlock(enp, entry->partn); } - __checkReturn int + __checkReturn efx_rc_t siena_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -750,7 +750,7 @@ siena_nvram_set_version( uint8_t cksum; uint32_t subtype; size_t length; - int rc; + efx_rc_t rc; if ((entry = siena_parttbl_entry(enp, type)) == NULL) { rc = ENOTSUP; @@ -861,7 +861,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/siena_phy.c b/sys/dev/sfxge/common/siena_phy.c index 94485ea76bc6..d39ae97d853a 100644 --- a/sys/dev/sfxge/common/siena_phy.c +++ b/sys/dev/sfxge/common/siena_phy.c @@ -167,12 +167,12 @@ siena_phy_link_ev( *link_modep = link_mode; } - __checkReturn int + __checkReturn efx_rc_t siena_phy_power( __in efx_nic_t *enp, __in boolean_t power) { - int rc; + efx_rc_t rc; if (!power) return (0); @@ -186,12 +186,12 @@ siena_phy_power( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_phy_get_link( __in efx_nic_t *enp, __out siena_link_state_t *slsp) @@ -199,7 +199,7 @@ siena_phy_get_link( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_GET_LINK_IN_LEN, MC_CMD_GET_LINK_OUT_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_LINK; @@ -261,12 +261,12 @@ siena_phy_get_link( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_phy_reconfigure( __in efx_nic_t *enp) { @@ -279,7 +279,7 @@ siena_phy_reconfigure( uint32_t cap_mask; unsigned int led_mode; unsigned int speed; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_SET_LINK; @@ -377,12 +377,12 @@ siena_phy_reconfigure( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_phy_verify( __in efx_nic_t *enp) { @@ -390,7 +390,7 @@ siena_phy_verify( uint8_t payload[MAX(MC_CMD_GET_PHY_STATE_IN_LEN, MC_CMD_GET_PHY_STATE_OUT_LEN)]; uint32_t state; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_GET_PHY_STATE; @@ -426,12 +426,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip) @@ -546,7 +546,7 @@ siena_phy_decode_stats( *smaskp = smask; } - __checkReturn int + __checkReturn efx_rc_t siena_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -558,7 +558,7 @@ siena_phy_stats_update( efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_PHY_STATS_IN_LEN, MC_CMD_PHY_STATS_OUT_DMA_LEN)]; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_PHY_STATS; @@ -586,7 +586,7 @@ siena_phy_stats_update( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (0); } @@ -609,7 +609,7 @@ siena_phy_prop_name( #endif /* EFSYS_OPT_NAMES */ -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, @@ -621,7 +621,7 @@ siena_phy_prop_get( return (ENOTSUP); } -extern __checkReturn int +extern __checkReturn efx_rc_t siena_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, @@ -636,12 +636,12 @@ siena_phy_prop_set( #if EFSYS_OPT_BIST - __checkReturn int + __checkReturn efx_rc_t siena_phy_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type) { - int rc; + efx_rc_t rc; if ((rc = efx_mcdi_bist_start(enp, type)) != 0) goto fail1; @@ -649,7 +649,7 @@ siena_phy_bist_start( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -674,7 +674,7 @@ siena_phy_sft9001_bist_status( } } - __checkReturn int + __checkReturn efx_rc_t siena_phy_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, @@ -691,7 +691,7 @@ siena_phy_bist_poll( uint32_t value_mask = 0; efx_mcdi_req_t req; uint32_t result; - int rc; + efx_rc_t rc; (void) memset(payload, 0, sizeof (payload)); req.emr_cmd = MC_CMD_POLL_BIST; @@ -823,7 +823,7 @@ siena_phy_bist_poll( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } diff --git a/sys/dev/sfxge/common/siena_sram.c b/sys/dev/sfxge/common/siena_sram.c index cf360673726d..9a9c5cacb5e7 100644 --- a/sys/dev/sfxge/common/siena_sram.c +++ b/sys/dev/sfxge/common/siena_sram.c @@ -77,7 +77,7 @@ siena_sram_init( #if EFSYS_OPT_DIAG - __checkReturn int + __checkReturn efx_rc_t siena_sram_test( __in efx_nic_t *enp, __in efx_sram_pattern_fn_t func) @@ -88,7 +88,7 @@ siena_sram_test( size_t rows; unsigned int wptr; unsigned int rptr; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -168,7 +168,7 @@ siena_sram_test( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); /* Restore back to FULL buffer table mode */ EFX_POPULATE_OWORD_1(oword, FRF_AZ_BUF_TBL_MODE, 1); diff --git a/sys/dev/sfxge/common/siena_vpd.c b/sys/dev/sfxge/common/siena_vpd.c index 4d4b825efc10..df6797d2fbae 100644 --- a/sys/dev/sfxge/common/siena_vpd.c +++ b/sys/dev/sfxge/common/siena_vpd.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t siena_vpd_get_static( __in efx_nic_t *enp, __in unsigned int partn, @@ -57,7 +57,7 @@ siena_vpd_get_static( unsigned int hdr_length; unsigned int pos; unsigned int region; - int rc; + efx_rc_t rc; EFSYS_ASSERT(partn == MC_CMD_NVRAM_TYPE_STATIC_CFG_PORT0 || partn == MC_CMD_NVRAM_TYPE_STATIC_CFG_PORT1); @@ -152,12 +152,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_init( __in efx_nic_t *enp) { @@ -165,7 +165,7 @@ siena_vpd_init( caddr_t svpd = NULL; unsigned partn; size_t size = 0; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -196,19 +196,19 @@ fail2: EFSYS_KMEM_FREE(enp->en_esip, size, svpd); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_size( __in efx_nic_t *enp, __out size_t *sizep) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); unsigned int partn; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -230,12 +230,12 @@ siena_vpd_size( return (0); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, @@ -247,7 +247,7 @@ siena_vpd_read( unsigned int vpd_offset; unsigned int dcfg_partn; size_t dcfg_size; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -282,12 +282,12 @@ fail2: EFSYS_KMEM_FREE(enp->en_esip, dcfg_size, dcfg); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -300,7 +300,7 @@ siena_vpd_verify( unsigned int scont; unsigned int dcont; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -357,19 +357,19 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size) { boolean_t wantpid; - int rc; + efx_rc_t rc; /* * Only create a PID if the dynamic cfg doesn't have one @@ -399,12 +399,12 @@ siena_vpd_reinit( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -413,7 +413,7 @@ siena_vpd_get( { unsigned int offset; uint8_t length; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -443,19 +443,19 @@ siena_vpd_get( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_set( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp) { - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -480,12 +480,12 @@ siena_vpd_set( fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_next( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -498,7 +498,7 @@ siena_vpd_next( return (ENOTSUP); } - __checkReturn int + __checkReturn efx_rc_t siena_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -513,7 +513,7 @@ siena_vpd_write( uint8_t cksum; size_t partn_size, dcfg_size; size_t vpd_length; - int rc; + efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); @@ -588,7 +588,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } |