sfxge(4): cleanup: constify common code method tables

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6317
This commit is contained in:
arybchik 2016-05-12 06:19:06 +00:00
parent 157633b369
commit 67fa27b15e
18 changed files with 216 additions and 216 deletions

View File

@ -109,7 +109,7 @@ falconsiena_ev_qstats_update(
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_SIENA
static efx_ev_ops_t __efx_ev_siena_ops = {
static const efx_ev_ops_t __efx_ev_siena_ops = {
falconsiena_ev_init, /* eevo_init */
falconsiena_ev_fini, /* eevo_fini */
falconsiena_ev_qcreate, /* eevo_qcreate */
@ -124,7 +124,7 @@ static efx_ev_ops_t __efx_ev_siena_ops = {
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_ev_ops_t __efx_ev_ef10_ops = {
static const efx_ev_ops_t __efx_ev_ef10_ops = {
ef10_ev_init, /* eevo_init */
ef10_ev_fini, /* eevo_fini */
ef10_ev_qcreate, /* eevo_qcreate */
@ -143,7 +143,7 @@ static efx_ev_ops_t __efx_ev_ef10_ops = {
efx_ev_init(
__in efx_nic_t *enp)
{
efx_ev_ops_t *eevop;
const efx_ev_ops_t *eevop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -157,19 +157,19 @@ efx_ev_init(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
eevop = (efx_ev_ops_t *)&__efx_ev_siena_ops;
eevop = &__efx_ev_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
eevop = (efx_ev_ops_t *)&__efx_ev_ef10_ops;
eevop = &__efx_ev_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
eevop = (efx_ev_ops_t *)&__efx_ev_ef10_ops;
eevop = &__efx_ev_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@ -203,7 +203,7 @@ fail1:
efx_ev_fini(
__in efx_nic_t *enp)
{
efx_ev_ops_t *eevop = enp->en_eevop;
const efx_ev_ops_t *eevop = enp->en_eevop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
@ -228,7 +228,7 @@ efx_ev_qcreate(
__in uint32_t id,
__deref_out efx_evq_t **eepp)
{
efx_ev_ops_t *eevop = enp->en_eevop;
const efx_ev_ops_t *eevop = enp->en_eevop;
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_evq_t *eep;
efx_rc_t rc;
@ -272,7 +272,7 @@ efx_ev_qdestroy(
__in efx_evq_t *eep)
{
efx_nic_t *enp = eep->ee_enp;
efx_ev_ops_t *eevop = enp->en_eevop;
const efx_ev_ops_t *eevop = enp->en_eevop;
EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);
@ -291,7 +291,7 @@ efx_ev_qprime(
__in unsigned int count)
{
efx_nic_t *enp = eep->ee_enp;
efx_ev_ops_t *eevop = enp->en_eevop;
const efx_ev_ops_t *eevop = enp->en_eevop;
efx_rc_t rc;
EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);
@ -383,7 +383,7 @@ efx_ev_qpost(
__in uint16_t data)
{
efx_nic_t *enp = eep->ee_enp;
efx_ev_ops_t *eevop = enp->en_eevop;
const efx_ev_ops_t *eevop = enp->en_eevop;
EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);
@ -399,7 +399,7 @@ efx_ev_qmoderate(
__in unsigned int us)
{
efx_nic_t *enp = eep->ee_enp;
efx_ev_ops_t *eevop = enp->en_eevop;
const efx_ev_ops_t *eevop = enp->en_eevop;
efx_rc_t rc;
EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);
@ -421,7 +421,7 @@ efx_ev_qstats_update(
__inout_ecount(EV_NQSTATS) efsys_stat_t *stat)
{ efx_nic_t *enp = eep->ee_enp;
efx_ev_ops_t *eevop = enp->en_eevop;
const efx_ev_ops_t *eevop = enp->en_eevop;
EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);

View File

@ -71,7 +71,7 @@ falconsiena_filter_supported_filters(
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_SIENA
static efx_filter_ops_t __efx_filter_siena_ops = {
static const efx_filter_ops_t __efx_filter_siena_ops = {
falconsiena_filter_init, /* efo_init */
falconsiena_filter_fini, /* efo_fini */
falconsiena_filter_restore, /* efo_restore */
@ -83,7 +83,7 @@ static efx_filter_ops_t __efx_filter_siena_ops = {
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_filter_ops_t __efx_filter_ef10_ops = {
static const efx_filter_ops_t __efx_filter_ef10_ops = {
ef10_filter_init, /* efo_init */
ef10_filter_fini, /* efo_fini */
ef10_filter_restore, /* efo_restore */
@ -99,7 +99,7 @@ efx_filter_insert(
__in efx_nic_t *enp,
__inout efx_filter_spec_t *spec)
{
efx_filter_ops_t *efop = enp->en_efop;
const efx_filter_ops_t *efop = enp->en_efop;
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER);
EFSYS_ASSERT3P(spec, !=, NULL);
@ -113,7 +113,7 @@ efx_filter_remove(
__in efx_nic_t *enp,
__inout efx_filter_spec_t *spec)
{
efx_filter_ops_t *efop = enp->en_efop;
const efx_filter_ops_t *efop = enp->en_efop;
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER);
EFSYS_ASSERT3P(spec, !=, NULL);
@ -149,7 +149,7 @@ fail1:
efx_filter_init(
__in efx_nic_t *enp)
{
efx_filter_ops_t *efop;
const efx_filter_ops_t *efop;
efx_rc_t rc;
/* Check that efx_filter_spec_t is 64 bytes. */
@ -162,19 +162,19 @@ efx_filter_init(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
efop = (efx_filter_ops_t *)&__efx_filter_siena_ops;
efop = &__efx_filter_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
efop = (efx_filter_ops_t *)&__efx_filter_ef10_ops;
efop = &__efx_filter_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
efop = (efx_filter_ops_t *)&__efx_filter_ef10_ops;
efop = &__efx_filter_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */

View File

@ -301,8 +301,8 @@ typedef struct efx_port_s {
#if EFSYS_OPT_BIST
efx_bist_type_t ep_current_bist;
#endif
efx_mac_ops_t *ep_emop;
efx_phy_ops_t *ep_epop;
const efx_mac_ops_t *ep_emop;
const efx_phy_ops_t *ep_epop;
} efx_port_t;
typedef struct efx_mon_ops_s {
@ -315,8 +315,8 @@ typedef struct efx_mon_ops_s {
} efx_mon_ops_t;
typedef struct efx_mon_s {
efx_mon_type_t em_type;
efx_mon_ops_t *em_emop;
efx_mon_type_t em_type;
const efx_mon_ops_t *em_emop;
} efx_mon_t;
typedef struct efx_intr_ops_s {
@ -333,10 +333,10 @@ typedef struct efx_intr_ops_s {
} efx_intr_ops_t;
typedef struct efx_intr_s {
efx_intr_ops_t *ei_eiop;
efsys_mem_t *ei_esmp;
efx_intr_type_t ei_type;
unsigned int ei_level;
const efx_intr_ops_t *ei_eiop;
efsys_mem_t *ei_esmp;
efx_intr_type_t ei_type;
unsigned int ei_level;
} efx_intr_t;
typedef struct efx_nic_ops_s {
@ -449,7 +449,7 @@ typedef struct efx_mcdi_ops_s {
} efx_mcdi_ops_t;
typedef struct efx_mcdi_s {
efx_mcdi_ops_t *em_emcop;
const efx_mcdi_ops_t *em_emcop;
const efx_mcdi_transport_t *em_emtp;
efx_mcdi_iface_t em_emip;
} efx_mcdi_t;
@ -617,23 +617,23 @@ struct efx_nic_s {
uint32_t en_ev_qcount;
uint32_t en_rx_qcount;
uint32_t en_tx_qcount;
efx_nic_ops_t *en_enop;
efx_ev_ops_t *en_eevop;
efx_tx_ops_t *en_etxop;
efx_rx_ops_t *en_erxop;
const efx_nic_ops_t *en_enop;
const efx_ev_ops_t *en_eevop;
const efx_tx_ops_t *en_etxop;
const efx_rx_ops_t *en_erxop;
#if EFSYS_OPT_FILTER
efx_filter_t en_filter;
efx_filter_ops_t *en_efop;
const efx_filter_ops_t *en_efop;
#endif /* EFSYS_OPT_FILTER */
#if EFSYS_OPT_MCDI
efx_mcdi_t en_mcdi;
#endif /* EFSYS_OPT_MCDI */
#if EFSYS_OPT_NVRAM
efx_nvram_type_t en_nvram_locked;
efx_nvram_ops_t *en_envop;
const efx_nvram_ops_t *en_envop;
#endif /* EFSYS_OPT_NVRAM */
#if EFSYS_OPT_VPD
efx_vpd_ops_t *en_evpdop;
const efx_vpd_ops_t *en_evpdop;
#endif /* EFSYS_OPT_VPD */
#if EFSYS_OPT_RX_SCALE
efx_rx_hash_support_t en_hash_support;
@ -642,7 +642,7 @@ struct efx_nic_s {
#endif /* EFSYS_OPT_RX_SCALE */
uint32_t en_vport_id;
#if EFSYS_OPT_LICENSING
efx_lic_ops_t *en_elop;
const efx_lic_ops_t *en_elop;
#endif
union {
#if EFSYS_OPT_SIENA

View File

@ -89,7 +89,7 @@ falconsiena_intr_check_fatal(
#if EFSYS_OPT_SIENA
static efx_intr_ops_t __efx_intr_siena_ops = {
static const efx_intr_ops_t __efx_intr_siena_ops = {
falconsiena_intr_init, /* eio_init */
falconsiena_intr_enable, /* eio_enable */
falconsiena_intr_disable, /* eio_disable */
@ -103,7 +103,7 @@ static efx_intr_ops_t __efx_intr_siena_ops = {
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_intr_ops_t __efx_intr_ef10_ops = {
static const efx_intr_ops_t __efx_intr_ef10_ops = {
ef10_intr_init, /* eio_init */
ef10_intr_enable, /* eio_enable */
ef10_intr_disable, /* eio_disable */
@ -123,7 +123,7 @@ efx_intr_init(
__in efsys_mem_t *esmp)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop;
const efx_intr_ops_t *eiop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -143,19 +143,19 @@ efx_intr_init(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
eiop = (efx_intr_ops_t *)&__efx_intr_siena_ops;
eiop = &__efx_intr_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
eiop = (efx_intr_ops_t *)&__efx_intr_ef10_ops;
eiop = &__efx_intr_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
eiop = (efx_intr_ops_t *)&__efx_intr_ef10_ops;
eiop = &__efx_intr_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@ -187,7 +187,7 @@ efx_intr_fini(
__in efx_nic_t *enp)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop = eip->ei_eiop;
const efx_intr_ops_t *eiop = eip->ei_eiop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC);
@ -203,7 +203,7 @@ efx_intr_enable(
__in efx_nic_t *enp)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop = eip->ei_eiop;
const efx_intr_ops_t *eiop = eip->ei_eiop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
@ -216,7 +216,7 @@ efx_intr_disable(
__in efx_nic_t *enp)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop = eip->ei_eiop;
const efx_intr_ops_t *eiop = eip->ei_eiop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
@ -229,7 +229,7 @@ efx_intr_disable_unlocked(
__in efx_nic_t *enp)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop = eip->ei_eiop;
const efx_intr_ops_t *eiop = eip->ei_eiop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
@ -244,7 +244,7 @@ efx_intr_trigger(
__in unsigned int level)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop = eip->ei_eiop;
const efx_intr_ops_t *eiop = eip->ei_eiop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
@ -259,7 +259,7 @@ efx_intr_status_line(
__out uint32_t *qmaskp)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop = eip->ei_eiop;
const efx_intr_ops_t *eiop = eip->ei_eiop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
@ -274,7 +274,7 @@ efx_intr_status_message(
__out boolean_t *fatalp)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop = eip->ei_eiop;
const efx_intr_ops_t *eiop = eip->ei_eiop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
@ -287,7 +287,7 @@ efx_intr_fatal(
__in efx_nic_t *enp)
{
efx_intr_t *eip = &(enp->en_intr);
efx_intr_ops_t *eiop = eip->ei_eiop;
const efx_intr_ops_t *eiop = eip->ei_eiop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);

View File

@ -47,7 +47,7 @@ efx_mcdi_fc_license_get_key_stats(
__in efx_nic_t *enp,
__out efx_key_stats_t *eksp);
static efx_lic_ops_t __efx_lic_v1_ops = {
static const efx_lic_ops_t __efx_lic_v1_ops = {
efx_mcdi_fc_license_update_license, /* elo_update_licenses */
efx_mcdi_fc_license_get_key_stats, /* elo_get_key_stats */
NULL, /* elo_app_state */
@ -73,7 +73,7 @@ efx_mcdi_licensed_app_state(
__in uint64_t app_id,
__out boolean_t *licensedp);
static efx_lic_ops_t __efx_lic_v2_ops = {
static const efx_lic_ops_t __efx_lic_v2_ops = {
efx_mcdi_licensing_update_licenses, /* elo_update_licenses */
efx_mcdi_licensing_get_key_stats, /* elo_get_key_stats */
efx_mcdi_licensed_app_state, /* elo_app_state */
@ -108,7 +108,7 @@ efx_mcdi_licensing_v3_get_id(
__out_bcount_part_opt(buffer_size, *lengthp)
uint8_t *bufferp);
static efx_lic_ops_t __efx_lic_v3_ops = {
static const efx_lic_ops_t __efx_lic_v3_ops = {
efx_mcdi_licensing_v3_update_licenses, /* elo_update_licenses */
efx_mcdi_licensing_v3_report_license, /* elo_get_key_stats */
efx_mcdi_licensing_v3_app_state, /* elo_app_state */
@ -624,7 +624,7 @@ fail1:
efx_lic_init(
__in efx_nic_t *enp)
{
efx_lic_ops_t *elop;
const efx_lic_ops_t *elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -635,19 +635,19 @@ efx_lic_init(
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
elop = (efx_lic_ops_t *)&__efx_lic_v1_ops;
elop = &__efx_lic_v1_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
elop = (efx_lic_ops_t *)&__efx_lic_v2_ops;
elop = &__efx_lic_v2_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
elop = (efx_lic_ops_t *)&__efx_lic_v3_ops;
elop = &__efx_lic_v3_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@ -672,7 +672,7 @@ fail1:
efx_lic_fini(
__in efx_nic_t *enp)
{
efx_lic_ops_t *elop = enp->en_elop;
const efx_lic_ops_t *elop = enp->en_elop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
@ -687,7 +687,7 @@ efx_lic_fini(
efx_lic_update_licenses(
__in efx_nic_t *enp)
{
efx_lic_ops_t *elop = enp->en_elop;
const efx_lic_ops_t *elop = enp->en_elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -709,7 +709,7 @@ efx_lic_get_key_stats(
__in efx_nic_t *enp,
__out efx_key_stats_t *eksp)
{
efx_lic_ops_t *elop = enp->en_elop;
const efx_lic_ops_t *elop = enp->en_elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -732,7 +732,7 @@ efx_lic_app_state(
__in uint64_t app_id,
__out boolean_t *licensedp)
{
efx_lic_ops_t *elop = enp->en_elop;
const efx_lic_ops_t *elop = enp->en_elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -764,7 +764,7 @@ efx_lic_get_id(
__out_opt uint8_t *bufferp
)
{
efx_lic_ops_t *elop = enp->en_elop;
const efx_lic_ops_t *elop = enp->en_elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);

View File

@ -43,7 +43,7 @@ falconsiena_mac_multicast_list_set(
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_SIENA
static efx_mac_ops_t __efx_siena_mac_ops = {
static const efx_mac_ops_t __efx_siena_mac_ops = {
NULL, /* emo_reset */
siena_mac_poll, /* emo_poll */
siena_mac_up, /* emo_up */
@ -65,7 +65,7 @@ static efx_mac_ops_t __efx_siena_mac_ops = {
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_mac_ops_t __efx_ef10_mac_ops = {
static const efx_mac_ops_t __efx_ef10_mac_ops = {
NULL, /* emo_reset */
ef10_mac_poll, /* emo_poll */
ef10_mac_up, /* emo_up */
@ -94,7 +94,7 @@ efx_mac_pdu_set(
__in size_t pdu)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
uint32_t old_pdu;
efx_rc_t rc;
@ -138,7 +138,7 @@ efx_mac_addr_set(
__in uint8_t *addr)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
uint8_t old_addr[6];
uint32_t oui;
efx_rc_t rc;
@ -186,7 +186,7 @@ efx_mac_filter_set(
__in boolean_t brdcst)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
boolean_t old_all_unicst;
boolean_t old_mulcst;
boolean_t old_all_mulcst;
@ -228,7 +228,7 @@ efx_mac_drain(
__in boolean_t enabled)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -267,7 +267,7 @@ efx_mac_up(
__out boolean_t *mac_upp)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -291,8 +291,8 @@ efx_mac_fcntl_set(
__in boolean_t autoneg)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
efx_phy_ops_t *epop = epp->ep_epop;
const efx_mac_ops_t *emop = epp->ep_emop;
const efx_phy_ops_t *epop = epp->ep_epop;
unsigned int old_fcntl;
boolean_t old_autoneg;
unsigned int old_adv_cap;
@ -391,7 +391,7 @@ efx_mac_multicast_list_set(
__in int count)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
uint8_t *old_mulcst_addr_list = NULL;
uint32_t old_mulcst_addr_count;
efx_rc_t rc;
@ -467,7 +467,7 @@ efx_mac_filter_default_rxq_set(
__in boolean_t using_rss)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -492,7 +492,7 @@ efx_mac_filter_default_rxq_clear(
__in efx_nic_t *enp)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
@ -612,7 +612,7 @@ efx_mac_stats_upload(
__in efsys_mem_t *esmp)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -645,7 +645,7 @@ efx_mac_stats_periodic(
__in boolean_t events)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -680,7 +680,7 @@ efx_mac_stats_update(
__inout_opt uint32_t *generationp)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -702,7 +702,7 @@ efx_mac_select(
{
efx_port_t *epp = &(enp->en_port);
efx_mac_type_t type = EFX_MAC_INVALID;
efx_mac_ops_t *emop;
const efx_mac_ops_t *emop;
int rc = EINVAL;
switch (enp->en_family) {
@ -798,7 +798,7 @@ falconsiena_mac_multicast_list_set(
__in efx_nic_t *enp)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_oword_t old_hash[2];
efx_rc_t rc;

View File

@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
#if EFSYS_OPT_SIENA
static efx_mcdi_ops_t __efx_mcdi_siena_ops = {
static const efx_mcdi_ops_t __efx_mcdi_siena_ops = {
siena_mcdi_init, /* emco_init */
siena_mcdi_send_request, /* emco_send_request */
siena_mcdi_poll_reboot, /* emco_poll_reboot */
@ -73,7 +73,7 @@ static efx_mcdi_ops_t __efx_mcdi_siena_ops = {
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_mcdi_ops_t __efx_mcdi_ef10_ops = {
static const efx_mcdi_ops_t __efx_mcdi_ef10_ops = {
ef10_mcdi_init, /* emco_init */
ef10_mcdi_send_request, /* emco_send_request */
ef10_mcdi_poll_reboot, /* emco_poll_reboot */
@ -92,7 +92,7 @@ efx_mcdi_init(
__in efx_nic_t *enp,
__in const efx_mcdi_transport_t *emtp)
{
efx_mcdi_ops_t *emcop;
const efx_mcdi_ops_t *emcop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -101,19 +101,19 @@ efx_mcdi_init(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
emcop = (efx_mcdi_ops_t *)&__efx_mcdi_siena_ops;
emcop = &__efx_mcdi_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
emcop = (efx_mcdi_ops_t *)&__efx_mcdi_ef10_ops;
emcop = &__efx_mcdi_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
emcop = (efx_mcdi_ops_t *)&__efx_mcdi_ef10_ops;
emcop = &__efx_mcdi_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@ -161,7 +161,7 @@ efx_mcdi_fini(
__in efx_nic_t *enp)
{
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, ==, EFX_MOD_MCDI);
@ -197,7 +197,7 @@ efx_mcdi_send_request(
__in void *sdup,
__in size_t sdu_len)
{
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
emcop->emco_send_request(enp, hdrp, hdr_len, sdup, sdu_len);
}
@ -206,7 +206,7 @@ static efx_rc_t
efx_mcdi_poll_reboot(
__in efx_nic_t *enp)
{
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
efx_rc_t rc;
rc = emcop->emco_poll_reboot(enp);
@ -217,7 +217,7 @@ static boolean_t
efx_mcdi_poll_response(
__in efx_nic_t *enp)
{
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
boolean_t available;
available = emcop->emco_poll_response(enp);
@ -231,7 +231,7 @@ efx_mcdi_read_response(
__in size_t offset,
__in size_t length)
{
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
emcop->emco_read_response(enp, bufferp, offset, length);
}
@ -1490,7 +1490,7 @@ efx_mcdi_firmware_update_supported(
__in efx_nic_t *enp,
__out boolean_t *supportedp)
{
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
efx_rc_t rc;
if (emcop != NULL) {
@ -1515,7 +1515,7 @@ efx_mcdi_macaddr_change_supported(
__in efx_nic_t *enp,
__out boolean_t *supportedp)
{
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
efx_rc_t rc;
if (emcop != NULL) {
@ -1540,7 +1540,7 @@ efx_mcdi_link_control_supported(
__in efx_nic_t *enp,
__out boolean_t *supportedp)
{
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
efx_rc_t rc;
if (emcop != NULL) {
@ -1565,7 +1565,7 @@ efx_mcdi_mac_spoofing_supported(
__in efx_nic_t *enp,
__out boolean_t *supportedp)
{
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
efx_rc_t rc;
if (emcop != NULL) {

View File

@ -66,7 +66,7 @@ efx_mon_name(
#endif /* EFSYS_OPT_NAMES */
#if EFSYS_OPT_MON_MCDI
static efx_mon_ops_t __efx_mon_mcdi_ops = {
static const efx_mon_ops_t __efx_mon_mcdi_ops = {
NULL, /* emo_reset */
NULL, /* emo_reconfigure */
#if EFSYS_OPT_MON_STATS
@ -82,7 +82,7 @@ efx_mon_init(
{
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_mon_t *emp = &(enp->en_mon);
efx_mon_ops_t *emop;
const efx_mon_ops_t *emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -253,7 +253,7 @@ efx_mon_stats_update(
__inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values)
{
efx_mon_t *emp = &(enp->en_mon);
efx_mon_ops_t *emop = emp->em_emop;
const efx_mon_ops_t *emop = emp->em_emop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MON);
@ -268,7 +268,7 @@ efx_mon_fini(
__in efx_nic_t *enp)
{
efx_mon_t *emp = &(enp->en_mon);
efx_mon_ops_t *emop = emp->em_emop;
const efx_mon_ops_t *emop = emp->em_emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);

View File

@ -179,7 +179,7 @@ fail1:
#if EFSYS_OPT_SIENA
static efx_nic_ops_t __efx_nic_siena_ops = {
static const efx_nic_ops_t __efx_nic_siena_ops = {
siena_nic_probe, /* eno_probe */
NULL, /* eno_board_cfg */
NULL, /* eno_set_drv_limits */
@ -198,7 +198,7 @@ static efx_nic_ops_t __efx_nic_siena_ops = {
#if EFSYS_OPT_HUNTINGTON
static efx_nic_ops_t __efx_nic_hunt_ops = {
static const efx_nic_ops_t __efx_nic_hunt_ops = {
ef10_nic_probe, /* eno_probe */
hunt_board_cfg, /* eno_board_cfg */
ef10_nic_set_drv_limits, /* eno_set_drv_limits */
@ -217,7 +217,7 @@ static efx_nic_ops_t __efx_nic_hunt_ops = {
#if EFSYS_OPT_MEDFORD
static efx_nic_ops_t __efx_nic_medford_ops = {
static const efx_nic_ops_t __efx_nic_medford_ops = {
ef10_nic_probe, /* eno_probe */
medford_board_cfg, /* eno_board_cfg */
ef10_nic_set_drv_limits, /* eno_set_drv_limits */
@ -262,7 +262,7 @@ efx_nic_create(
switch (family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
enp->en_enop = (efx_nic_ops_t *)&__efx_nic_siena_ops;
enp->en_enop = &__efx_nic_siena_ops;
enp->en_features =
EFX_FEATURE_IPV6 |
EFX_FEATURE_LFSR_HASH_INSERT |
@ -278,7 +278,7 @@ efx_nic_create(
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
enp->en_enop = (efx_nic_ops_t *)&__efx_nic_hunt_ops;
enp->en_enop = &__efx_nic_hunt_ops;
/* FIXME: Add WOL support */
enp->en_features =
EFX_FEATURE_IPV6 |
@ -295,7 +295,7 @@ efx_nic_create(
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
enp->en_enop = (efx_nic_ops_t *)&__efx_nic_medford_ops;
enp->en_enop = &__efx_nic_medford_ops;
/*
* FW_ASSISTED_TSO omitted as Medford only supports firmware
* assisted TSO version 2, not the v1 scheme used on Huntington.
@ -343,7 +343,7 @@ fail1:
efx_nic_probe(
__in efx_nic_t *enp)
{
efx_nic_ops_t *enop;
const efx_nic_ops_t *enop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -379,7 +379,7 @@ efx_nic_set_drv_limits(
__inout efx_nic_t *enp,
__in efx_drv_limits_t *edlp)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -405,7 +405,7 @@ efx_nic_get_bar_region(
__out uint32_t *offsetp,
__out size_t *sizep)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -440,7 +440,7 @@ efx_nic_get_vi_pool(
__out uint32_t *rxq_countp,
__out uint32_t *txq_countp)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
efx_nic_cfg_t *encp = &enp->en_nic_cfg;
efx_rc_t rc;
@ -477,7 +477,7 @@ fail1:
efx_nic_init(
__in efx_nic_t *enp)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -507,7 +507,7 @@ fail1:
efx_nic_fini(
__in efx_nic_t *enp)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_PROBE);
@ -526,7 +526,7 @@ efx_nic_fini(
efx_nic_unprobe(
__in efx_nic_t *enp)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
#if EFSYS_OPT_MCDI
@ -572,7 +572,7 @@ efx_nic_destroy(
efx_nic_reset(
__in efx_nic_t *enp)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
unsigned int mod_flags;
efx_rc_t rc;
@ -626,7 +626,7 @@ efx_nic_cfg_get(
efx_nic_register_test(
__in efx_nic_t *enp)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);

View File

@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
#if EFSYS_OPT_SIENA
static efx_nvram_ops_t __efx_nvram_siena_ops = {
static const efx_nvram_ops_t __efx_nvram_siena_ops = {
#if EFSYS_OPT_DIAG
siena_nvram_test, /* envo_test */
#endif /* EFSYS_OPT_DIAG */
@ -58,7 +58,7 @@ static efx_nvram_ops_t __efx_nvram_siena_ops = {
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_nvram_ops_t __efx_nvram_ef10_ops = {
static const efx_nvram_ops_t __efx_nvram_ef10_ops = {
#if EFSYS_OPT_DIAG
ef10_nvram_test, /* envo_test */
#endif /* EFSYS_OPT_DIAG */
@ -80,7 +80,7 @@ static efx_nvram_ops_t __efx_nvram_ef10_ops = {
efx_nvram_init(
__in efx_nic_t *enp)
{
efx_nvram_ops_t *envop;
const efx_nvram_ops_t *envop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -90,19 +90,19 @@ efx_nvram_init(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
envop = (efx_nvram_ops_t *)&__efx_nvram_siena_ops;
envop = &__efx_nvram_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
envop = (efx_nvram_ops_t *)&__efx_nvram_ef10_ops;
envop = &__efx_nvram_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
envop = (efx_nvram_ops_t *)&__efx_nvram_ef10_ops;
envop = &__efx_nvram_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@ -129,7 +129,7 @@ fail1:
efx_nvram_test(
__in efx_nic_t *enp)
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -154,7 +154,7 @@ efx_nvram_size(
__in efx_nvram_type_t type,
__out size_t *sizep)
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
uint32_t partn;
efx_rc_t rc;
@ -187,7 +187,7 @@ efx_nvram_get_version(
__out uint32_t *subtypep,
__out_ecount(4) uint16_t version[4])
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
uint32_t partn;
efx_rc_t rc;
@ -220,7 +220,7 @@ efx_nvram_rw_start(
__in efx_nvram_type_t type,
__out_opt size_t *chunk_sizep)
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
uint32_t partn;
efx_rc_t rc;
@ -258,7 +258,7 @@ efx_nvram_read_chunk(
__out_bcount(size) caddr_t data,
__in size_t size)
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
uint32_t partn;
efx_rc_t rc;
@ -291,7 +291,7 @@ efx_nvram_erase(
__in efx_nic_t *enp,
__in efx_nvram_type_t type)
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
unsigned int offset = 0;
size_t size = 0;
uint32_t partn;
@ -334,7 +334,7 @@ efx_nvram_write_chunk(
__in_bcount(size) caddr_t data,
__in size_t size)
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
uint32_t partn;
efx_rc_t rc;
@ -367,7 +367,7 @@ efx_nvram_rw_finish(
__in efx_nic_t *enp,
__in efx_nvram_type_t type)
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
uint32_t partn;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -390,7 +390,7 @@ efx_nvram_set_version(
__in efx_nvram_type_t type,
__in_ecount(4) uint16_t version[4])
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
uint32_t partn;
efx_rc_t rc;
@ -431,7 +431,7 @@ efx_nvram_validate(
__in_bcount(partn_size) caddr_t partn_data,
__in size_t partn_size)
{
efx_nvram_ops_t *envop = enp->en_envop;
const efx_nvram_ops_t *envop = enp->en_envop;
uint32_t partn;
efx_rc_t rc;

View File

@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
#if EFSYS_OPT_SIENA
static efx_phy_ops_t __efx_phy_siena_ops = {
static const efx_phy_ops_t __efx_phy_siena_ops = {
siena_phy_power, /* epo_power */
NULL, /* epo_reset */
siena_phy_reconfigure, /* epo_reconfigure */
@ -64,7 +64,7 @@ static efx_phy_ops_t __efx_phy_siena_ops = {
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_phy_ops_t __efx_phy_ef10_ops = {
static const efx_phy_ops_t __efx_phy_ef10_ops = {
ef10_phy_power, /* epo_power */
NULL, /* epo_reset */
ef10_phy_reconfigure, /* epo_reconfigure */
@ -98,7 +98,7 @@ efx_phy_probe(
{
efx_port_t *epp = &(enp->en_port);
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_phy_ops_t *epop;
const efx_phy_ops_t *epop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -110,17 +110,17 @@ efx_phy_probe(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
epop = (efx_phy_ops_t *)&__efx_phy_siena_ops;
epop = &__efx_phy_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
epop = (efx_phy_ops_t *)&__efx_phy_ef10_ops;
epop = &__efx_phy_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
epop = (efx_phy_ops_t *)&__efx_phy_ef10_ops;
epop = &__efx_phy_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
default:
@ -146,7 +146,7 @@ efx_phy_verify(
__in efx_nic_t *enp)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
@ -163,7 +163,7 @@ efx_phy_led_set(
{
efx_nic_cfg_t *encp = (&enp->en_nic_cfg);
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
uint32_t mask;
efx_rc_t rc;
@ -232,7 +232,7 @@ efx_phy_adv_cap_set(
__in uint32_t mask)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
uint32_t old_mask;
efx_rc_t rc;
@ -294,7 +294,7 @@ efx_phy_oui_get(
__out uint32_t *ouip)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
@ -427,7 +427,7 @@ efx_phy_stats_update(
__inout_ecount(EFX_PHY_NSTATS) uint32_t *stat)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
@ -446,7 +446,7 @@ efx_phy_prop_name(
__in unsigned int id)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
@ -463,7 +463,7 @@ efx_phy_prop_get(
__out uint32_t *valp)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
@ -478,7 +478,7 @@ efx_phy_prop_set(
__in uint32_t val)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
@ -494,7 +494,7 @@ efx_bist_enable_offline(
__in efx_nic_t *enp)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -524,7 +524,7 @@ efx_bist_start(
__in efx_bist_type_t type)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -563,7 +563,7 @@ efx_bist_poll(
__in size_t count)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -598,7 +598,7 @@ efx_bist_stop(
__in efx_bist_type_t type)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);

View File

@ -39,7 +39,7 @@ efx_port_init(
__in efx_nic_t *enp)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -104,7 +104,7 @@ efx_port_poll(
__out_opt efx_link_mode_t *link_modep)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_link_mode_t ignore_link_mode;
efx_rc_t rc;
@ -138,7 +138,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;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -234,7 +234,7 @@ efx_port_fini(
__in efx_nic_t *enp)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);

View File

@ -129,7 +129,7 @@ falconsiena_rx_qdestroy(
#if EFSYS_OPT_SIENA
static efx_rx_ops_t __efx_rx_siena_ops = {
static const efx_rx_ops_t __efx_rx_siena_ops = {
falconsiena_rx_init, /* erxo_init */
falconsiena_rx_fini, /* erxo_fini */
#if EFSYS_OPT_RX_SCATTER
@ -152,7 +152,7 @@ static efx_rx_ops_t __efx_rx_siena_ops = {
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_rx_ops_t __efx_rx_ef10_ops = {
static const efx_rx_ops_t __efx_rx_ef10_ops = {
ef10_rx_init, /* erxo_init */
ef10_rx_fini, /* erxo_fini */
#if EFSYS_OPT_RX_SCATTER
@ -179,7 +179,7 @@ static efx_rx_ops_t __efx_rx_ef10_ops = {
efx_rx_init(
__inout efx_nic_t *enp)
{
efx_rx_ops_t *erxop;
const efx_rx_ops_t *erxop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -198,19 +198,19 @@ efx_rx_init(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
erxop = (efx_rx_ops_t *)&__efx_rx_siena_ops;
erxop = &__efx_rx_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
erxop = (efx_rx_ops_t *)&__efx_rx_ef10_ops;
erxop = &__efx_rx_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
erxop = (efx_rx_ops_t *)&__efx_rx_ef10_ops;
erxop = &__efx_rx_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@ -245,7 +245,7 @@ fail1:
efx_rx_fini(
__in efx_nic_t *enp)
{
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC);
@ -264,7 +264,7 @@ efx_rx_scatter_enable(
__in efx_nic_t *enp,
__in unsigned int buf_size)
{
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -341,7 +341,7 @@ efx_rx_scale_mode_set(
__in efx_rx_hash_type_t type,
__in boolean_t insert)
{
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -368,7 +368,7 @@ efx_rx_scale_key_set(
__in_ecount(n) uint8_t *key,
__in size_t n)
{
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -393,7 +393,7 @@ efx_rx_scale_tbl_set(
__in_ecount(n) unsigned int *table,
__in size_t n)
{
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -421,7 +421,7 @@ efx_rx_qpost(
__in unsigned int added)
{
efx_nic_t *enp = erp->er_enp;
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
EFSYS_ASSERT3U(erp->er_magic, ==, EFX_RXQ_MAGIC);
@ -435,7 +435,7 @@ efx_rx_qpush(
__inout unsigned int *pushedp)
{
efx_nic_t *enp = erp->er_enp;
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
EFSYS_ASSERT3U(erp->er_magic, ==, EFX_RXQ_MAGIC);
@ -447,7 +447,7 @@ efx_rx_qflush(
__in efx_rxq_t *erp)
{
efx_nic_t *enp = erp->er_enp;
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
efx_rc_t rc;
EFSYS_ASSERT3U(erp->er_magic, ==, EFX_RXQ_MAGIC);
@ -468,7 +468,7 @@ efx_rx_qenable(
__in efx_rxq_t *erp)
{
efx_nic_t *enp = erp->er_enp;
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
EFSYS_ASSERT3U(erp->er_magic, ==, EFX_RXQ_MAGIC);
@ -487,7 +487,7 @@ efx_rx_qcreate(
__in efx_evq_t *eep,
__deref_out efx_rxq_t **erpp)
{
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
efx_rxq_t *erp;
efx_rc_t rc;
@ -532,7 +532,7 @@ efx_rx_qdestroy(
__in efx_rxq_t *erp)
{
efx_nic_t *enp = erp->er_enp;
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
EFSYS_ASSERT3U(erp->er_magic, ==, EFX_RXQ_MAGIC);
@ -545,7 +545,7 @@ efx_psuedo_hdr_pkt_length_get(
__in uint8_t *buffer,
__out uint16_t *lengthp)
{
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
return (erxop->erxo_prefix_pktlen(enp, buffer, lengthp));
}
@ -557,7 +557,7 @@ efx_psuedo_hdr_hash_get(
__in efx_rx_hash_alg_t func,
__in uint8_t *buffer)
{
efx_rx_ops_t *erxop = enp->en_erxop;
const efx_rx_ops_t *erxop = enp->en_erxop;
EFSYS_ASSERT3U(enp->en_hash_support, ==, EFX_RX_HASH_AVAILABLE);
return (erxop->erxo_prefix_hash(enp, func, buffer));

View File

@ -125,7 +125,7 @@ falconsiena_tx_qstats_update(
#if EFSYS_OPT_SIENA
static efx_tx_ops_t __efx_tx_siena_ops = {
static const efx_tx_ops_t __efx_tx_siena_ops = {
falconsiena_tx_init, /* etxo_init */
falconsiena_tx_fini, /* etxo_fini */
falconsiena_tx_qcreate, /* etxo_qcreate */
@ -151,7 +151,7 @@ static efx_tx_ops_t __efx_tx_siena_ops = {
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
static efx_tx_ops_t __efx_tx_hunt_ops = {
static const efx_tx_ops_t __efx_tx_hunt_ops = {
ef10_tx_init, /* etxo_init */
ef10_tx_fini, /* etxo_fini */
ef10_tx_qcreate, /* etxo_qcreate */
@ -177,7 +177,7 @@ static efx_tx_ops_t __efx_tx_hunt_ops = {
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
static efx_tx_ops_t __efx_tx_medford_ops = {
static const efx_tx_ops_t __efx_tx_medford_ops = {
ef10_tx_init, /* etxo_init */
ef10_tx_fini, /* etxo_fini */
ef10_tx_qcreate, /* etxo_qcreate */
@ -206,7 +206,7 @@ static efx_tx_ops_t __efx_tx_medford_ops = {
efx_tx_init(
__in efx_nic_t *enp)
{
efx_tx_ops_t *etxop;
const efx_tx_ops_t *etxop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -225,19 +225,19 @@ efx_tx_init(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
etxop = (efx_tx_ops_t *)&__efx_tx_siena_ops;
etxop = &__efx_tx_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
etxop = (efx_tx_ops_t *)&__efx_tx_hunt_ops;
etxop = &__efx_tx_hunt_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
etxop = (efx_tx_ops_t *)&__efx_tx_medford_ops;
etxop = &__efx_tx_medford_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@ -274,7 +274,7 @@ fail1:
efx_tx_fini(
__in efx_nic_t *enp)
{
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC);
@ -300,7 +300,7 @@ efx_tx_qcreate(
__deref_out efx_txq_t **etpp,
__out unsigned int *addedp)
{
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_txq_t *etp;
efx_rc_t rc;
@ -349,7 +349,7 @@ efx_tx_qdestroy(
__in efx_txq_t *etp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -371,7 +371,7 @@ efx_tx_qpost(
__inout unsigned int *addedp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
efx_rc_t rc;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -394,7 +394,7 @@ efx_tx_qpush(
__in unsigned int pushed)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -407,7 +407,7 @@ efx_tx_qpace(
__in unsigned int ns)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
efx_rc_t rc;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -427,7 +427,7 @@ efx_tx_qflush(
__in efx_txq_t *etp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
efx_rc_t rc;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -447,7 +447,7 @@ efx_tx_qenable(
__in efx_txq_t *etp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -459,7 +459,7 @@ efx_tx_qpio_enable(
__in efx_txq_t *etp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
efx_rc_t rc;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -491,7 +491,7 @@ efx_tx_qpio_disable(
__in efx_txq_t *etp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -507,7 +507,7 @@ efx_tx_qpio_write(
__in size_t pio_buf_offset)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
efx_rc_t rc;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -534,7 +534,7 @@ efx_tx_qpio_post(
__inout unsigned int *addedp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
efx_rc_t rc;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -562,7 +562,7 @@ efx_tx_qdesc_post(
__inout unsigned int *addedp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
efx_rc_t rc;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
@ -587,7 +587,7 @@ efx_tx_qdesc_dma_create(
__out efx_desc_t *edp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
EFSYS_ASSERT(etxop->etxo_qdesc_dma_create != NULL);
@ -604,7 +604,7 @@ efx_tx_qdesc_tso_create(
__out efx_desc_t *edp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
EFSYS_ASSERT(etxop->etxo_qdesc_tso_create != NULL);
@ -622,7 +622,7 @@ efx_tx_qdesc_tso2_create(
__in int count)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
EFSYS_ASSERT(etxop->etxo_qdesc_tso2_create != NULL);
@ -637,7 +637,7 @@ efx_tx_qdesc_vlantci_create(
__out efx_desc_t *edp)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
EFSYS_ASSERT(etxop->etxo_qdesc_vlantci_create != NULL);
@ -653,7 +653,7 @@ efx_tx_qstats_update(
__inout_ecount(TX_NQSTATS) efsys_stat_t *stat)
{
efx_nic_t *enp = etp->et_enp;
efx_tx_ops_t *etxop = enp->en_etxop;
const efx_tx_ops_t *etxop = enp->en_etxop;
EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);

View File

@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
#if EFSYS_OPT_SIENA
static efx_vpd_ops_t __efx_vpd_siena_ops = {
static const efx_vpd_ops_t __efx_vpd_siena_ops = {
siena_vpd_init, /* evpdo_init */
siena_vpd_size, /* evpdo_size */
siena_vpd_read, /* evpdo_read */
@ -73,7 +73,7 @@ static efx_vpd_ops_t __efx_vpd_siena_ops = {
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
static efx_vpd_ops_t __efx_vpd_ef10_ops = {
static const efx_vpd_ops_t __efx_vpd_ef10_ops = {
ef10_vpd_init, /* evpdo_init */
ef10_vpd_size, /* evpdo_size */
ef10_vpd_read, /* evpdo_read */
@ -92,7 +92,7 @@ static efx_vpd_ops_t __efx_vpd_ef10_ops = {
efx_vpd_init(
__in efx_nic_t *enp)
{
efx_vpd_ops_t *evpdop;
const efx_vpd_ops_t *evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -102,19 +102,19 @@ efx_vpd_init(
switch (enp->en_family) {
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
evpdop = (efx_vpd_ops_t *)&__efx_vpd_siena_ops;
evpdop = &__efx_vpd_siena_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
evpdop = (efx_vpd_ops_t *)&__efx_vpd_ef10_ops;
evpdop = &__efx_vpd_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
evpdop = (efx_vpd_ops_t *)&__efx_vpd_ef10_ops;
evpdop = &__efx_vpd_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@ -147,7 +147,7 @@ efx_vpd_size(
__in efx_nic_t *enp,
__out size_t *sizep)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -170,7 +170,7 @@ efx_vpd_read(
__out_bcount(size) caddr_t data,
__in size_t size)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -193,7 +193,7 @@ efx_vpd_verify(
__in_bcount(size) caddr_t data,
__in size_t size)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -216,7 +216,7 @@ efx_vpd_reinit(
__in_bcount(size) caddr_t data,
__in size_t size)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -247,7 +247,7 @@ efx_vpd_get(
__in size_t size,
__inout efx_vpd_value_t *evvp)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -271,7 +271,7 @@ efx_vpd_set(
__in size_t size,
__in efx_vpd_value_t *evvp)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -296,7 +296,7 @@ efx_vpd_next(
__out efx_vpd_value_t *evvp,
__inout unsigned int *contp)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -319,7 +319,7 @@ efx_vpd_write(
__in_bcount(size) caddr_t data,
__in size_t size)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@ -999,7 +999,7 @@ fail1:
efx_vpd_fini(
__in efx_nic_t *enp)
{
efx_vpd_ops_t *evpdop = enp->en_evpdop;
const efx_vpd_ops_t *evpdop = enp->en_evpdop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);

View File

@ -314,7 +314,7 @@ ef10_mac_multicast_list_set(
__in efx_nic_t *enp)
{
efx_port_t *epp = &(enp->en_port);
efx_mac_ops_t *emop = epp->ep_emop;
const efx_mac_ops_t *emop = epp->ep_emop;
efx_rc_t rc;
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
@ -390,7 +390,7 @@ ef10_mac_loopback_set(
__in efx_loopback_type_t loopback_type)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
efx_loopback_type_t old_loopback_type;
efx_link_mode_t old_loopback_link_mode;
efx_rc_t rc;

View File

@ -1400,7 +1400,7 @@ fail1:
ef10_nic_probe(
__in efx_nic_t *enp)
{
efx_nic_ops_t *enop = enp->en_enop;
const efx_nic_ops_t *enop = enp->en_enop;
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_drv_cfg_t *edcp = &(enp->en_drv_cfg);
efx_rc_t rc;

View File

@ -197,7 +197,7 @@ siena_mac_loopback_set(
__in efx_loopback_type_t loopback_type)
{
efx_port_t *epp = &(enp->en_port);
efx_phy_ops_t *epop = epp->ep_epop;
const efx_phy_ops_t *epop = epp->ep_epop;
efx_loopback_type_t old_loopback_type;
efx_link_mode_t old_loopback_link_mode;
efx_rc_t rc;