From patchwork Sat Sep 29 14:56:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 147842 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1986165lji; Sat, 29 Sep 2018 07:58:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV63iSMvssoTcdjGTq4eUc56INDnCPbjrVkGJ2BW2+BXC2z6URJM7Ika7wAjbHhDnaZJPvO1s X-Received: by 2002:a63:4044:: with SMTP id n65-v6mr3140735pga.90.1538233129229; Sat, 29 Sep 2018 07:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538233129; cv=none; d=google.com; s=arc-20160816; b=y1c8qIiaNa6+ruet8gguH1MKCvwVt8yUNjBcDR92ZacRrdl0UiPR3XNjWDc1Uk8/L9 ZYY5zgoL6n5ftwnRjco2N/w8IbB7uxLHVjh6ofD45Yy9Hu/eyZNh+xR+knvfG0JPF6f2 8ZXZv12A0tQZBSLPeY1EtJTuATgIouBmiAIqpSTLTjdjkzCRcBD6JgCO+TSxAvfAPoiv Ur7cqOHMNO5RyLmKxtzLjpPbaXcrcsLAJQO72ZTBKdGHBPr4+UFM/6cz3RIneCgV9+Vr ZZrJSz5T4E3IwnB32Z8sKn8GFKH7zx+3epo2sL7mnKOrKdDom5t/go5d8fq7gx8BbHap foIw== 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 w186-v6si715148pgd.471.2018.09.29.07.58.48; Sat, 29 Sep 2018 07:58:49 -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 S1728445AbeI2V1a (ORCPT + 32 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 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(-) -- 2.11.0 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: