Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1980395imm; Sat, 29 Sep 2018 07:59:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV60rlYWZG6gddptmT8MbeamkzRl442O+H1ho0Z/VioxzLlHAskHRJX7W1TjH8noLrUK/AYB7 X-Received: by 2002:a63:6203:: with SMTP id w3-v6mr3224869pgb.53.1538233158350; Sat, 29 Sep 2018 07:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538233158; cv=none; d=google.com; s=arc-20160816; b=SAwTA1iOFuzTICKT+ct/wbfFDKoCtbXPTfSSZuGQyiDhsOJ/OCwspgoJ5lF5uV5m6e x+uwRiw9g8DQK2TtzgoJTnaswK4pIEGr0etHC0cZMSJp9+JGh0A+XBqL22cosbRE7kNG pZTVaMbvpeYPRe36OgmmQ7+Fj4zt7KN64oB0RWJQ8UHWbhDywqpQA/aRrbIy3VjTwln+ 5VtnxB8odmIUh4ZniuGfw7KpvPvM/dD0PxOh1J8U+wi9AZLtwG0f7AxkqKzZs6SJIu4N 52z6oU7bWMez40qshSA5zGXV81s2H4GpdRlDcK/3w106F0zy1227eFINY/nGBiTT9uZY 2S4Q== 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=kqp7CINV7Ul92cFPouHVs57mSorRho41OS58L3wpNPE=; b=JV6fnI9oiqpTYAJX4jG3IoOSvoPvrwICb4/bplebsnJA0bg15QXJ1b1yRe2OcV2i5h z743igwlR+Ykfvob+8bwDezjpacoezQBtB4Wco4tQ2rrvtHBlm5ztH4eT2IdUlToV643 6Egb18j0Sh912uOBqln90NfwjOIMo7rfPI1zly6Wae0m+vK/BQGXy3G+JAvaD/GtvO9C HvJ/X2pI/SgF7Diyus/RjYznXIfw3mIP+0HEzmiNf3YMXJVh6j1qSA1Yxvcr1urJKffR AUttGQ5vqsDaT2PV/QIqgellEJed5ObuGpEmY5sWRUd2u6nbyVmOusMDV+CD6yBCgKRs sY9g== 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 r16-v6si7240965pfh.229.2018.09.29.07.59.03; Sat, 29 Sep 2018 07:59:18 -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 S1728435AbeI2V1a (ORCPT + 99 others); Sat, 29 Sep 2018 17:27:30 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57455 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728416AbeI2V13 (ORCPT ); Sat, 29 Sep 2018 17:27:29 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D4C05930FECE4; Sat, 29 Sep 2018 22:58:42 +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:36 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH V2 net-next 03/10] net: hns3: Rename loop mode Date: Sat, 29 Sep 2018 15:56:15 +0100 Message-ID: <20180929145622.5448-4-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 Content-Type: text/plain 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 Our loop mode includes mac loop, serdes loop and phy loop. Not all of them are related with mac. This patch corrects their names. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 8 ++++---- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 12 ++++++------ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index 564afd4c1323..03d7878c6168 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -84,10 +84,10 @@ struct hnae3_queue { /*hnae3 loop mode*/ enum hnae3_loop { - HNAE3_MAC_INTER_LOOP_MAC, - HNAE3_MAC_INTER_LOOP_SERDES, - HNAE3_MAC_INTER_LOOP_PHY, - HNAE3_MAC_LOOP_NONE, + HNAE3_LOOP_MAC, + HNAE3_LOOP_SERDES, + HNAE3_LOOP_PHY, + HNAE3_LOOP_NONE, }; enum hnae3_client_type { diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 8803a8721c8e..86587cf2a676 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -78,8 +78,8 @@ static int hns3_lp_setup(struct net_device *ndev, enum hnae3_loop loop, bool en) return -EOPNOTSUPP; switch (loop) { - case HNAE3_MAC_INTER_LOOP_SERDES: - case HNAE3_MAC_INTER_LOOP_MAC: + case HNAE3_LOOP_SERDES: + case HNAE3_LOOP_MAC: ret = h->ae_algo->ops->set_loopback(h, loop, en); break; default: @@ -286,12 +286,12 @@ static void hns3_self_test(struct net_device *ndev, if (eth_test->flags != ETH_TEST_FL_OFFLINE) return; - st_param[HNAE3_MAC_INTER_LOOP_MAC][0] = HNAE3_MAC_INTER_LOOP_MAC; - st_param[HNAE3_MAC_INTER_LOOP_MAC][1] = + st_param[HNAE3_LOOP_MAC][0] = HNAE3_LOOP_MAC; + st_param[HNAE3_LOOP_MAC][1] = h->flags & HNAE3_SUPPORT_MAC_LOOPBACK; - st_param[HNAE3_MAC_INTER_LOOP_SERDES][0] = HNAE3_MAC_INTER_LOOP_SERDES; - st_param[HNAE3_MAC_INTER_LOOP_SERDES][1] = + st_param[HNAE3_LOOP_SERDES][0] = HNAE3_LOOP_SERDES; + st_param[HNAE3_LOOP_SERDES][1] = h->flags & HNAE3_SUPPORT_SERDES_LOOPBACK; if (if_running) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 2de5a0061dc9..33e97fcfe74e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -523,19 +523,19 @@ static void hclge_get_strings(struct hnae3_handle *handle, } else if (stringset == ETH_SS_TEST) { if (handle->flags & HNAE3_SUPPORT_MAC_LOOPBACK) { memcpy(p, - hns3_nic_test_strs[HNAE3_MAC_INTER_LOOP_MAC], + hns3_nic_test_strs[HNAE3_LOOP_MAC], ETH_GSTRING_LEN); p += ETH_GSTRING_LEN; } if (handle->flags & HNAE3_SUPPORT_SERDES_LOOPBACK) { memcpy(p, - hns3_nic_test_strs[HNAE3_MAC_INTER_LOOP_SERDES], + hns3_nic_test_strs[HNAE3_LOOP_SERDES], ETH_GSTRING_LEN); p += ETH_GSTRING_LEN; } if (handle->flags & HNAE3_SUPPORT_PHY_LOOPBACK) { memcpy(p, - hns3_nic_test_strs[HNAE3_MAC_INTER_LOOP_PHY], + hns3_nic_test_strs[HNAE3_LOOP_PHY], ETH_GSTRING_LEN); p += ETH_GSTRING_LEN; } @@ -3459,10 +3459,10 @@ static int hclge_set_loopback(struct hnae3_handle *handle, int i, ret; switch (loop_mode) { - case HNAE3_MAC_INTER_LOOP_MAC: + case HNAE3_LOOP_MAC: ret = hclge_set_mac_loopback(hdev, en); break; - case HNAE3_MAC_INTER_LOOP_SERDES: + case HNAE3_LOOP_SERDES: ret = hclge_set_serdes_loopback(hdev, en); break; default: -- 2.11.0