common/sfc_efx/base: set NIC features in generic place
authorAndrew Rybchenko <arybchenko@solarflare.com>
Thu, 24 Sep 2020 12:11:47 +0000 (13:11 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 17:19:12 +0000 (19:19 +0200)
There is no point to duplicate it NIC family specific probe handlers.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
drivers/common/sfc_efx/base/ef10_nic.c
drivers/common/sfc_efx/base/efx_nic.c
drivers/common/sfc_efx/base/siena_nic.c

index 47329ff..4796dd6 100644 (file)
@@ -2098,8 +2098,6 @@ ef10_nic_probe(
        }
 #endif
 
-       encp->enc_features = enp->en_features;
-
        return (0);
 
 #if EFSYS_OPT_MON_STATS
index b5e3666..9d6961e 100644 (file)
@@ -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;
 
index bd5e8ce..b9b6d19 100644 (file)
@@ -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