From patchwork Sat Sep 29 14:56:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 147844 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1986293lji; Sat, 29 Sep 2018 07:58:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV624WvF0jqyMAuhyl7z+xp7nJf1t5bCynFg5uFhehv4gtI21tKy3WeINHUyndiLnZofP9nZO X-Received: by 2002:a62:2056:: with SMTP id g83-v6mr3463694pfg.165.1538233138970; Sat, 29 Sep 2018 07:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538233138; cv=none; d=google.com; s=arc-20160816; b=CK6gi3LLljyiNwyfFpOEJC2lklENlnBm81UZflnvt1GVNq/NC1ZAHf2z+/BftNUC7A PHO8uMjy7vLKlHUlFR34cx5cSSn2l/Xrrx+Myto5IpIIwskNOixKLgf5qwryqoq6ok0o 2CPFNIlPXKg/jv+envutmE/G1ohOWKVrEapC9zJ8MQ6CUpyiaJz3AxkY0BA5pl1YaxTy 12vLYye0o2hiWxBSQyg9A+jN28uQJDYD2pfWtgQZbl9OAzTu5smjob7H4qGFHvk9X4E4 Nj1OmNpMys2bd0JI3rHjrUAH9WdAiEiADKykSpY+R0nye+P11QsAviLDYVF7Scoq3cV/ s8tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=xreiFlljSVPbb04iM9F5nSNfxjugt9qNK873SkpJyvk=; b=DrDNLDY92cof0HPFaIb6Q7ZbAfNzxMO6uZ4d/Nfuk/5CPnFufck7PcSkG31EYeELZo RwhyRTwYmANBRQsGIk3m1CZYN7+TUaoqT5lvT1a4cPVl5Tr/AmSF9uyUOV6O6qtKfqPO nFJtFUXcGhCVIfnd3kQyX/gRxYjH99h+hi5UjOLuIGViwT5zhyzCoBzNgsO9ahOQKGf1 dhmhyaU/ufnK8ho7Xa0MMaVjNfI4dRwmW8iQtGT8LDGx9yrsIPAmYTRVMdKE9l/gERLz RPHIZPIHowuFjJz0dHh28NExqLlcibSrpTmuGN8cJe7K938bDQsZWJrdbk2KNi83tQuP os7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d41-v6si7536685pla.172.2018.09.29.07.58.58; Sat, 29 Sep 2018 07:58:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728498AbeI2V1k (ORCPT + 32 others); Sat, 29 Sep 2018 17:27:40 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13583 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728416AbeI2V1g (ORCPT ); Sat, 29 Sep 2018 17:27:36 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 38228E5AFA142; Sat, 29 Sep 2018 22:58:47 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.85.66) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.399.0; Sat, 29 Sep 2018 22:58:39 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH V2 net-next 04/10] net: hns3: Rename mac loopback to app loopback Date: Sat, 29 Sep 2018 15:56:16 +0100 Message-ID: <20180929145622.5448-5-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180929145622.5448-1-salil.mehta@huawei.com> References: <20180929145622.5448-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.85.66] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang In fact, our implementation of mac loopback is the implementation of app loopback now. Current name is wrong. This patch renames mac loopback to app loopback. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 8 ++++---- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) -- 2.11.0 diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index 03d7878c6168..27155ea76c3a 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -84,7 +84,7 @@ struct hnae3_queue { /*hnae3 loop mode*/ enum hnae3_loop { - HNAE3_LOOP_MAC, + HNAE3_LOOP_APP, HNAE3_LOOP_SERDES, HNAE3_LOOP_PHY, HNAE3_LOOP_NONE, @@ -478,7 +478,7 @@ struct hnae3_unic_private_info { struct hnae3_queue **tqp; /* array base of all TQPs of this instance */ }; -#define HNAE3_SUPPORT_MAC_LOOPBACK BIT(0) +#define HNAE3_SUPPORT_APP_LOOPBACK BIT(0) #define HNAE3_SUPPORT_PHY_LOOPBACK BIT(1) #define HNAE3_SUPPORT_SERDES_LOOPBACK BIT(2) #define HNAE3_SUPPORT_VF BIT(3) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 86587cf2a676..75ebd2e95236 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -79,7 +79,7 @@ static int hns3_lp_setup(struct net_device *ndev, enum hnae3_loop loop, bool en) switch (loop) { case HNAE3_LOOP_SERDES: - case HNAE3_LOOP_MAC: + case HNAE3_LOOP_APP: ret = h->ae_algo->ops->set_loopback(h, loop, en); break; default: @@ -286,9 +286,9 @@ static void hns3_self_test(struct net_device *ndev, if (eth_test->flags != ETH_TEST_FL_OFFLINE) return; - st_param[HNAE3_LOOP_MAC][0] = HNAE3_LOOP_MAC; - st_param[HNAE3_LOOP_MAC][1] = - h->flags & HNAE3_SUPPORT_MAC_LOOPBACK; + st_param[HNAE3_LOOP_APP][0] = HNAE3_LOOP_APP; + st_param[HNAE3_LOOP_APP][1] = + h->flags & HNAE3_SUPPORT_APP_LOOPBACK; st_param[HNAE3_LOOP_SERDES][0] = HNAE3_LOOP_SERDES; st_param[HNAE3_LOOP_SERDES][1] = diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 33e97fcfe74e..a0f6329020f6 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -49,7 +49,7 @@ static const struct pci_device_id ae_algo_pci_tbl[] = { MODULE_DEVICE_TABLE(pci, ae_algo_pci_tbl); static const char hns3_nic_test_strs[][ETH_GSTRING_LEN] = { - "Mac Loopback test", + "App Loopback test", "Serdes Loopback test", "Phy Loopback test" }; @@ -493,7 +493,7 @@ static int hclge_get_sset_count(struct hnae3_handle *handle, int stringset) hdev->hw.mac.speed == HCLGE_MAC_SPEED_100M || hdev->hw.mac.speed == HCLGE_MAC_SPEED_1G) { count += 1; - handle->flags |= HNAE3_SUPPORT_MAC_LOOPBACK; + handle->flags |= HNAE3_SUPPORT_APP_LOOPBACK; } count++; @@ -521,9 +521,9 @@ static void hclge_get_strings(struct hnae3_handle *handle, p); p = hclge_tqps_get_strings(handle, p); } else if (stringset == ETH_SS_TEST) { - if (handle->flags & HNAE3_SUPPORT_MAC_LOOPBACK) { + if (handle->flags & HNAE3_SUPPORT_APP_LOOPBACK) { memcpy(p, - hns3_nic_test_strs[HNAE3_LOOP_MAC], + hns3_nic_test_strs[HNAE3_LOOP_APP], ETH_GSTRING_LEN); p += ETH_GSTRING_LEN; } @@ -3345,7 +3345,7 @@ static void hclge_cfg_mac_mode(struct hclge_dev *hdev, bool enable) "mac enable fail, ret =%d.\n", ret); } -static int hclge_set_mac_loopback(struct hclge_dev *hdev, bool en) +static int hclge_set_app_loopback(struct hclge_dev *hdev, bool en) { struct hclge_config_mac_mode_cmd *req; struct hclge_desc desc; @@ -3459,8 +3459,8 @@ static int hclge_set_loopback(struct hnae3_handle *handle, int i, ret; switch (loop_mode) { - case HNAE3_LOOP_MAC: - ret = hclge_set_mac_loopback(hdev, en); + case HNAE3_LOOP_APP: + ret = hclge_set_app_loopback(hdev, en); break; case HNAE3_LOOP_SERDES: ret = hclge_set_serdes_loopback(hdev, en);