From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 300B9A04E1; Tue, 22 Sep 2020 10:51:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 549AC1D8F6; Tue, 22 Sep 2020 10:50:30 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 174881D709 for ; Tue, 22 Sep 2020 10:50:15 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.150]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id B891C20080 for ; Tue, 22 Sep 2020 08:50:14 +0000 (UTC) Received: from us4-mdac16-6.at1.mdlocal (unknown [10.110.49.173]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id B7C52800A3 for ; Tue, 22 Sep 2020 08:50:14 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.8]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 33EEC100061 for ; Tue, 22 Sep 2020 08:50:14 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id F19F64C0059 for ; Tue, 22 Sep 2020 08:50:13 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 22 Sep 2020 09:50:09 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 22 Sep 2020 09:50:09 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 08M8o95E004601 for ; Tue, 22 Sep 2020 09:50:09 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 518B21613AB for ; Tue, 22 Sep 2020 09:50:09 +0100 (BST) From: Andrew Rybchenko To: Date: Tue, 22 Sep 2020 09:49:02 +0100 Message-ID: <1600764594-14752-9-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600764594-14752-1-git-send-email-arybchenko@solarflare.com> References: <1600764594-14752-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25674.003 X-TM-AS-Result: No-1.074200-8.000000-10 X-TMASE-MatchedRID: nrIZmht90cNwmwJKzmoXvN1+No0HEURtaeMaKzvXUpljLp8Cm8vwF7KB pljvKsfOfGzuoVn0Vs6PQi9XuOWoOC4MnFER4ZGiGjzBgnFZvQ6Siza26cvwNHQWhLVqLFM1cJj /63vxb+bcpir9o9vPDofzlXy/8SlVgQFyHQeFnIMJaVZHbbd1rgKflB9+9kWVSnXYhdlqPHmpcA WxL62s8uLzNWBegCW2wgn7iDBesS1YF3qW3Je6+8BPxgumcAHI7RJwHpVq7Aq8Ic1w05BiFANiC kmfk8OGaqLHzpksuLDp+C7T3/z4X92zjHYaNYZpqfdMTFBcU+x1YgP7EQSqZKoWu33FSCn66r5P Qhx29DUG0+3lZBNmQtq4RBohbjorPW+luMETwh5+3BndfXUhXQ== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.074200-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25674.003 X-MDID: 1600764614-CMaZ-VuiDUmI Subject: [dpdk-dev] [PATCH 08/60] common/sfc_efx/base: use EF10 PHY methods for Riverhead X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There is no difference yet in PHY support on EF10 and Riverhead. So, it is better to reuse existing methods. Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton Reviewed-by: Vijay Kumar Srivastava --- drivers/common/sfc_efx/base/ef10_phy.c | 4 ++-- drivers/common/sfc_efx/base/efx_phy.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/drivers/common/sfc_efx/base/ef10_phy.c b/drivers/common/sfc_efx/base/ef10_phy.c index 622374f7b6..b9822e4d42 100644 --- a/drivers/common/sfc_efx/base/ef10_phy.c +++ b/drivers/common/sfc_efx/base/ef10_phy.c @@ -7,7 +7,7 @@ #include "efx.h" #include "efx_impl.h" -#if EFX_OPTS_EF10() +#if EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() static void mcdi_phy_decode_cap( @@ -755,4 +755,4 @@ ef10_bist_stop( #endif /* EFSYS_OPT_BIST */ -#endif /* EFX_OPTS_EF10() */ +#endif /* EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() */ diff --git a/drivers/common/sfc_efx/base/efx_phy.c b/drivers/common/sfc_efx/base/efx_phy.c index 841d148852..8df868d80c 100644 --- a/drivers/common/sfc_efx/base/efx_phy.c +++ b/drivers/common/sfc_efx/base/efx_phy.c @@ -48,6 +48,26 @@ static const efx_phy_ops_t __efx_phy_ef10_ops = { }; #endif /* EFX_OPTS_EF10() */ +#if EFSYS_OPT_RIVERHEAD +static const efx_phy_ops_t __efx_phy_rhead_ops = { + ef10_phy_power, /* epo_power */ + NULL, /* epo_reset */ + ef10_phy_reconfigure, /* epo_reconfigure */ + ef10_phy_verify, /* epo_verify */ + ef10_phy_oui_get, /* epo_oui_get */ + ef10_phy_link_state_get, /* epo_link_state_get */ +#if EFSYS_OPT_PHY_STATS + ef10_phy_stats_update, /* epo_stats_update */ +#endif /* EFSYS_OPT_PHY_STATS */ +#if EFSYS_OPT_BIST + ef10_bist_enable_offline, /* epo_bist_enable_offline */ + ef10_bist_start, /* epo_bist_start */ + ef10_bist_poll, /* epo_bist_poll */ + ef10_bist_stop, /* epo_bist_stop */ +#endif /* EFSYS_OPT_BIST */ +}; +#endif /* EFSYS_OPT_RIVERHEAD */ + __checkReturn efx_rc_t efx_phy_probe( __in efx_nic_t *enp) @@ -88,6 +108,12 @@ efx_phy_probe( break; #endif /* EFSYS_OPT_MEDFORD2 */ +#if EFSYS_OPT_RIVERHEAD + case EFX_FAMILY_RIVERHEAD: + epop = &__efx_phy_rhead_ops; + break; +#endif /* EFSYS_OPT_MEDFORD2 */ + default: rc = ENOTSUP; goto fail1; -- 2.17.1