[v3,12/60] common/sfc_efx/base: set NIC features in generic place
diff mbox series

Message ID 1600949555-28043-13-git-send-email-arybchenko@solarflare.com
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series
  • common/sfc_efx: support Riverhead NIC family
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Sept. 24, 2020, 12:11 p.m. UTC
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  | 2 --
 drivers/common/sfc_efx/base/efx_nic.c   | 3 +++
 drivers/common/sfc_efx/base/siena_nic.c | 3 ---
 3 files changed, 3 insertions(+), 5 deletions(-)

Patch
diff mbox series

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