From: Andrew Rybchenko Date: Thu, 24 Sep 2020 12:11:47 +0000 (+0100) Subject: common/sfc_efx/base: set NIC features in generic place X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=538fd2ac05695060271563b94bb4e3f2080e3b39;p=dpdk.git common/sfc_efx/base: set NIC features in generic place There is no point to duplicate it NIC family specific probe handlers. Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c index 47329ff8dc..4796dd6b59 100644 --- a/drivers/common/sfc_efx/base/ef10_nic.c +++ b/drivers/common/sfc_efx/base/ef10_nic.c @@ -2098,8 +2098,6 @@ ef10_nic_probe( } #endif - encp->enc_features = enp->en_features; - return (0); #if EFSYS_OPT_MON_STATS diff --git a/drivers/common/sfc_efx/base/efx_nic.c b/drivers/common/sfc_efx/base/efx_nic.c index b5e36661c9..9d6961e2ff 100644 --- a/drivers/common/sfc_efx/base/efx_nic.c +++ b/drivers/common/sfc_efx/base/efx_nic.c @@ -318,6 +318,7 @@ efx_nic_probe( __in efx_nic_t *enp, __in efx_fw_variant_t efv) { + efx_nic_cfg_t *encp = &(enp->en_nic_cfg); const efx_nic_ops_t *enop; efx_rc_t rc; @@ -351,6 +352,8 @@ efx_nic_probe( if ((rc = enop->eno_probe(enp)) != 0) goto fail1; + encp->enc_features = enp->en_features; + if ((rc = efx_phy_probe(enp)) != 0) goto fail2; diff --git a/drivers/common/sfc_efx/base/siena_nic.c b/drivers/common/sfc_efx/base/siena_nic.c index bd5e8ceb8a..b9b6d1951c 100644 --- a/drivers/common/sfc_efx/base/siena_nic.c +++ b/drivers/common/sfc_efx/base/siena_nic.c @@ -301,7 +301,6 @@ siena_nic_probe( __in efx_nic_t *enp) { efx_port_t *epp = &(enp->en_port); - efx_nic_cfg_t *encp = &(enp->en_nic_cfg); siena_link_state_t sls; unsigned int mask; efx_oword_t oword; @@ -369,8 +368,6 @@ siena_nic_probe( goto fail12; #endif - encp->enc_features = enp->en_features; - return (0); #if EFSYS_OPT_MON_STATS