Index: head/sys/dev/sfxge/common/efx_ev.c =================================================================== --- head/sys/dev/sfxge/common/efx_ev.c +++ head/sys/dev/sfxge/common/efx_ev.c @@ -109,7 +109,7 @@ #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 @@ #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 @@ 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 @@ 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 @@ 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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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); Index: head/sys/dev/sfxge/common/efx_filter.c =================================================================== --- head/sys/dev/sfxge/common/efx_filter.c +++ head/sys/dev/sfxge/common/efx_filter.c @@ -71,7 +71,7 @@ #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 @@ #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 @@ __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 @@ __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 @@ 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 @@ 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 */ Index: head/sys/dev/sfxge/common/efx_impl.h =================================================================== --- head/sys/dev/sfxge/common/efx_impl.h +++ head/sys/dev/sfxge/common/efx_impl.h @@ -301,8 +301,8 @@ #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 @@ } 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 @@ } 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 @@ } 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 @@ 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 @@ #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 Index: head/sys/dev/sfxge/common/efx_intr.c =================================================================== --- head/sys/dev/sfxge/common/efx_intr.c +++ head/sys/dev/sfxge/common/efx_intr.c @@ -89,7 +89,7 @@ #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 @@ #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 @@ __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 @@ 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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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); Index: head/sys/dev/sfxge/common/efx_lic.c =================================================================== --- head/sys/dev/sfxge/common/efx_lic.c +++ head/sys/dev/sfxge/common/efx_lic.c @@ -47,7 +47,7 @@ __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 @@ __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 @@ __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 @@ 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 @@ #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 @@ 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_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 @@ __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 @@ __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 @@ __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); Index: head/sys/dev/sfxge/common/efx_mac.c =================================================================== --- head/sys/dev/sfxge/common/efx_mac.c +++ head/sys/dev/sfxge/common/efx_mac.c @@ -43,7 +43,7 @@ #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 @@ #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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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_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 @@ __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; Index: head/sys/dev/sfxge/common/efx_mcdi.c =================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c +++ head/sys/dev/sfxge/common/efx_mcdi.c @@ -59,7 +59,7 @@ #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 @@ #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 @@ __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 @@ 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 @@ __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 @@ __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 @@ 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 @@ 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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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) { Index: head/sys/dev/sfxge/common/efx_mon.c =================================================================== --- head/sys/dev/sfxge/common/efx_mon.c +++ head/sys/dev/sfxge/common/efx_mon.c @@ -66,7 +66,7 @@ #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_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 @@ __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 @@ __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); Index: head/sys/dev/sfxge/common/efx_nic.c =================================================================== --- head/sys/dev/sfxge/common/efx_nic.c +++ head/sys/dev/sfxge/common/efx_nic.c @@ -179,7 +179,7 @@ #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 @@ #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 @@ #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 @@ 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 @@ #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 @@ #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 @@ 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 @@ __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 @@ __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 @@ __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 @@ 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 @@ 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_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_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_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); Index: head/sys/dev/sfxge/common/efx_nvram.c =================================================================== --- head/sys/dev/sfxge/common/efx_nvram.c +++ head/sys/dev/sfxge/common/efx_nvram.c @@ -38,7 +38,7 @@ #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 @@ #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 @@ 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 @@ 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 @@ 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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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; Index: head/sys/dev/sfxge/common/efx_phy.c =================================================================== --- head/sys/dev/sfxge/common/efx_phy.c +++ head/sys/dev/sfxge/common/efx_phy.c @@ -36,7 +36,7 @@ #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 @@ #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_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 @@ 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 @@ __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_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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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); Index: head/sys/dev/sfxge/common/efx_port.c =================================================================== --- head/sys/dev/sfxge/common/efx_port.c +++ head/sys/dev/sfxge/common/efx_port.c @@ -39,7 +39,7 @@ __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 @@ __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_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 @@ __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); Index: head/sys/dev/sfxge/common/efx_rx.c =================================================================== --- head/sys/dev/sfxge/common/efx_rx.c +++ head/sys/dev/sfxge/common/efx_rx.c @@ -129,7 +129,7 @@ #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 @@ #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 @@ 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 @@ 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 @@ 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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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)); Index: head/sys/dev/sfxge/common/efx_tx.c =================================================================== --- head/sys/dev/sfxge/common/efx_tx.c +++ head/sys/dev/sfxge/common/efx_tx.c @@ -125,7 +125,7 @@ #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 @@ #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 @@ #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 @@ 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 @@ 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 @@ 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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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); Index: head/sys/dev/sfxge/common/efx_vpd.c =================================================================== --- head/sys/dev/sfxge/common/efx_vpd.c +++ head/sys/dev/sfxge/common/efx_vpd.c @@ -56,7 +56,7 @@ #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 @@ #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 @@ 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 @@ 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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ __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 @@ 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); Index: head/sys/dev/sfxge/common/hunt_mac.c =================================================================== --- head/sys/dev/sfxge/common/hunt_mac.c +++ head/sys/dev/sfxge/common/hunt_mac.c @@ -314,7 +314,7 @@ __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 @@ __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; Index: head/sys/dev/sfxge/common/hunt_nic.c =================================================================== --- head/sys/dev/sfxge/common/hunt_nic.c +++ head/sys/dev/sfxge/common/hunt_nic.c @@ -1400,7 +1400,7 @@ 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; Index: head/sys/dev/sfxge/common/siena_mac.c =================================================================== --- head/sys/dev/sfxge/common/siena_mac.c +++ head/sys/dev/sfxge/common/siena_mac.c @@ -197,7 +197,7 @@ __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;