Index: head/sys/dev/sfxge/common/efx.h =================================================================== --- head/sys/dev/sfxge/common/efx.h +++ head/sys/dev/sfxge/common/efx.h @@ -2314,6 +2314,10 @@ efx_lic_fini( __in efx_nic_t *enp); +extern __checkReturn boolean_t +efx_lic_check_support( + __in efx_nic_t *enp); + extern __checkReturn efx_rc_t efx_lic_update_licenses( __in efx_nic_t *enp); 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 @@ -636,6 +636,7 @@ uint32_t en_vport_id; #if EFSYS_OPT_LICENSING const efx_lic_ops_t *en_elop; + boolean_t en_licensing_supported; #endif union { #if EFSYS_OPT_SIENA 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 @@ -1330,6 +1330,7 @@ __in efx_nic_t *enp) { const efx_lic_ops_t *elop; + efx_key_stats_t eks; efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); @@ -1365,6 +1366,13 @@ enp->en_elop = elop; enp->en_mod_flags |= EFX_MOD_LIC; + /* Probe for support */ + if (efx_lic_get_key_stats(enp, &eks) == 0) { + enp->en_licensing_supported = B_TRUE; + } else { + enp->en_licensing_supported = B_FALSE; + } + return (0); fail1: @@ -1373,6 +1381,17 @@ return (rc); } +extern __checkReturn boolean_t +efx_lic_check_support( + __in efx_nic_t *enp) +{ + EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC); + + return enp->en_licensing_supported; +} + void efx_lic_fini( __in efx_nic_t *enp) 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 @@ -580,7 +580,7 @@ EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_PROBE); /* - * All modules except the MCDI, PROBE, NVRAM, VPD, MON, LIC + * All modules except the MCDI, PROBE, NVRAM, VPD, MON * (which we do not reset here) must have been shut down or never * initialized. * @@ -590,7 +590,7 @@ */ mod_flags = enp->en_mod_flags; mod_flags &= ~(EFX_MOD_MCDI | EFX_MOD_PROBE | EFX_MOD_NVRAM | - EFX_MOD_VPD | EFX_MOD_MON | EFX_MOD_LIC); + EFX_MOD_VPD | EFX_MOD_MON); EFSYS_ASSERT3U(mod_flags, ==, 0); if (mod_flags != 0) { rc = EINVAL;