From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 094D5A034F; Wed, 31 Mar 2021 12:02:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D779140EB2; Wed, 31 Mar 2021 12:01:37 +0200 (CEST) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id D4EA7140E4C for ; Wed, 31 Mar 2021 12:01:26 +0200 (CEST) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4F9MGt227bz9v4k for ; Wed, 31 Mar 2021 17:59:18 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Wed, 31 Mar 2021 18:01:18 +0800 From: "Min Hu (Connor)" To: CC: Date: Wed, 31 Mar 2021 18:01:35 +0800 Message-ID: <1617184904-55349-2-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1617184904-55349-1-git-send-email-humin29@huawei.com> References: <1617184904-55349-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 01/10] net/hns3: fix some function names for copper media type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Huisong Li PHY is a common concept for the copper and optical media type interface. There are some inappropriate function names for copper ports, which needs to be adjusted. Fixes: 2e4859f3b362 ("net/hns3: support PF device with copper PHYs") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 9c71808..953e8a1 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4547,7 +4547,7 @@ hns3_update_fiber_link_info(struct hns3_hw *hw) } static void -hns3_parse_phy_params(struct hns3_cmd_desc *desc, struct hns3_mac *mac) +hns3_parse_copper_phy_params(struct hns3_cmd_desc *desc, struct hns3_mac *mac) { struct hns3_phy_params_bd0_cmd *req; @@ -4565,7 +4565,7 @@ hns3_parse_phy_params(struct hns3_cmd_desc *desc, struct hns3_mac *mac) } static int -hns3_get_phy_params(struct hns3_hw *hw, struct hns3_mac *mac) +hns3_get_copper_phy_params(struct hns3_hw *hw, struct hns3_mac *mac) { struct hns3_cmd_desc desc[HNS3_PHY_PARAM_CFG_BD_NUM]; uint16_t i; @@ -4584,20 +4584,20 @@ hns3_get_phy_params(struct hns3_hw *hw, struct hns3_mac *mac) return ret; } - hns3_parse_phy_params(desc, mac); + hns3_parse_copper_phy_params(desc, mac); return 0; } static int -hns3_update_phy_link_info(struct hns3_hw *hw) +hns3_update_copper_link_info(struct hns3_hw *hw) { struct hns3_mac *mac = &hw->mac; struct hns3_mac mac_info; int ret; memset(&mac_info, 0, sizeof(struct hns3_mac)); - ret = hns3_get_phy_params(hw, &mac_info); + ret = hns3_get_copper_phy_params(hw, &mac_info); if (ret) return ret; @@ -4626,7 +4626,7 @@ hns3_update_link_info(struct rte_eth_dev *eth_dev) int ret = 0; if (hw->mac.media_type == HNS3_MEDIA_TYPE_COPPER) - ret = hns3_update_phy_link_info(hw); + ret = hns3_update_copper_link_info(hw); else if (hw->mac.media_type == HNS3_MEDIA_TYPE_FIBER) ret = hns3_update_fiber_link_info(hw); -- 2.7.4