net/sfc/base: add Medford2 support for licensing

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Andy Moreton 2018-02-20 07:34:24 +00:00 committed by Ferruh Yigit
parent e782bf865d
commit 62f544985d

View File

@ -165,7 +165,7 @@ static const efx_lic_ops_t __efx_lic_v2_ops = {
#endif /* EFSYS_OPT_HUNTINGTON */ #endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD #if EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
static __checkReturn efx_rc_t static __checkReturn efx_rc_t
efx_mcdi_licensing_v3_update_licenses( efx_mcdi_licensing_v3_update_licenses(
@ -289,7 +289,7 @@ static const efx_lic_ops_t __efx_lic_v3_ops = {
efx_lic_v3_finish_partition, /* elo_finish_partition */ 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 */ /* V1 Licensing - used in Siena Modena only */
@ -822,7 +822,7 @@ efx_mcdi_licensing_get_key_stats(
/* V3 Licensing - used starting from Medford family. See SF-114884-SW */ /* 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 static __checkReturn efx_rc_t
efx_mcdi_licensing_v3_update_licenses( efx_mcdi_licensing_v3_update_licenses(
@ -832,7 +832,8 @@ efx_mcdi_licensing_v3_update_licenses(
uint8_t payload[MC_CMD_LICENSING_V3_IN_LEN]; uint8_t payload[MC_CMD_LICENSING_V3_IN_LEN];
efx_rc_t rc; 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)); (void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_LICENSING_V3; req.emr_cmd = MC_CMD_LICENSING_V3;
@ -869,7 +870,8 @@ efx_mcdi_licensing_v3_report_license(
MC_CMD_LICENSING_V3_OUT_LEN)]; MC_CMD_LICENSING_V3_OUT_LEN)];
efx_rc_t rc; 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)); (void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_LICENSING_V3; req.emr_cmd = MC_CMD_LICENSING_V3;
@ -933,7 +935,8 @@ efx_mcdi_licensing_v3_app_state(
uint32_t app_state; uint32_t app_state;
efx_rc_t rc; 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)); (void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_GET_LICENSED_V3_APP_STATE; req.emr_cmd = MC_CMD_GET_LICENSED_V3_APP_STATE;
@ -1265,7 +1268,7 @@ efx_lic_v3_finish_partition(
} }
#endif /* EFSYS_OPT_MEDFORD */ #endif /* EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
__checkReturn efx_rc_t __checkReturn efx_rc_t
efx_lic_init( efx_lic_init(
@ -1299,6 +1302,12 @@ efx_lic_init(
break; break;
#endif /* EFSYS_OPT_MEDFORD */ #endif /* EFSYS_OPT_MEDFORD */
#if EFSYS_OPT_MEDFORD2
case EFX_FAMILY_MEDFORD2:
elop = &__efx_lic_v3_ops;
break;
#endif /* EFSYS_OPT_MEDFORD2 */
default: default:
EFSYS_ASSERT(0); EFSYS_ASSERT(0);
rc = ENOTSUP; rc = ENOTSUP;