sfxge(4): add Medford2 support for licensing
Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18202
This commit is contained in:
parent
f83ec5160d
commit
ef3b3edeb6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341127
@ -192,7 +192,7 @@ static const efx_lic_ops_t __efx_lic_v2_ops = {
|
||||
|
||||
#endif /* EFSYS_OPT_HUNTINGTON */
|
||||
|
||||
#if EFSYS_OPT_MEDFORD
|
||||
#if EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
|
||||
|
||||
static __checkReturn efx_rc_t
|
||||
efx_mcdi_licensing_v3_update_licenses(
|
||||
@ -316,7 +316,7 @@ static const efx_lic_ops_t __efx_lic_v3_ops = {
|
||||
efx_lic_v3_finish_partition, /* elo_finish_partition */
|
||||
};
|
||||
|
||||
#endif /* EFSYS_OPT_MEDFORD */
|
||||
#endif /* EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
|
||||
|
||||
|
||||
/* V1 Licensing - used in Siena Modena only */
|
||||
@ -849,7 +849,7 @@ efx_mcdi_licensing_get_key_stats(
|
||||
|
||||
/* V3 Licensing - used starting from Medford family. See SF-114884-SW */
|
||||
|
||||
#if EFSYS_OPT_MEDFORD
|
||||
#if EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
|
||||
|
||||
static __checkReturn efx_rc_t
|
||||
efx_mcdi_licensing_v3_update_licenses(
|
||||
@ -859,7 +859,8 @@ efx_mcdi_licensing_v3_update_licenses(
|
||||
uint8_t payload[MC_CMD_LICENSING_V3_IN_LEN];
|
||||
efx_rc_t rc;
|
||||
|
||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_MEDFORD);
|
||||
EFSYS_ASSERT((enp->en_family == EFX_FAMILY_MEDFORD) ||
|
||||
(enp->en_family == EFX_FAMILY_MEDFORD2));
|
||||
|
||||
(void) memset(payload, 0, sizeof (payload));
|
||||
req.emr_cmd = MC_CMD_LICENSING_V3;
|
||||
@ -896,7 +897,8 @@ efx_mcdi_licensing_v3_report_license(
|
||||
MC_CMD_LICENSING_V3_OUT_LEN)];
|
||||
efx_rc_t rc;
|
||||
|
||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_MEDFORD);
|
||||
EFSYS_ASSERT((enp->en_family == EFX_FAMILY_MEDFORD) ||
|
||||
(enp->en_family == EFX_FAMILY_MEDFORD2));
|
||||
|
||||
(void) memset(payload, 0, sizeof (payload));
|
||||
req.emr_cmd = MC_CMD_LICENSING_V3;
|
||||
@ -960,7 +962,8 @@ efx_mcdi_licensing_v3_app_state(
|
||||
uint32_t app_state;
|
||||
efx_rc_t rc;
|
||||
|
||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_MEDFORD);
|
||||
EFSYS_ASSERT((enp->en_family == EFX_FAMILY_MEDFORD) ||
|
||||
(enp->en_family == EFX_FAMILY_MEDFORD2));
|
||||
|
||||
(void) memset(payload, 0, sizeof (payload));
|
||||
req.emr_cmd = MC_CMD_GET_LICENSED_V3_APP_STATE;
|
||||
@ -1292,7 +1295,7 @@ efx_lic_v3_finish_partition(
|
||||
}
|
||||
|
||||
|
||||
#endif /* EFSYS_OPT_MEDFORD */
|
||||
#endif /* EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
|
||||
|
||||
__checkReturn efx_rc_t
|
||||
efx_lic_init(
|
||||
@ -1326,6 +1329,12 @@ efx_lic_init(
|
||||
break;
|
||||
#endif /* EFSYS_OPT_MEDFORD */
|
||||
|
||||
#if EFSYS_OPT_MEDFORD2
|
||||
case EFX_FAMILY_MEDFORD2:
|
||||
elop = &__efx_lic_v3_ops;
|
||||
break;
|
||||
#endif /* EFSYS_OPT_MEDFORD2 */
|
||||
|
||||
default:
|
||||
EFSYS_ASSERT(0);
|
||||
rc = ENOTSUP;
|
||||
|
Loading…
Reference in New Issue
Block a user