From: Salil Mehta <salil.mehta@huawei.com>
To: <davem@davemloft.net>
Cc: <salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
<lipeng321@huawei.com>, <mehta.salil@opnsrc.net>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, Fuyun Liang <liangfuyun1@huawei.com>
Subject: [PATCH net-next 03/10] net: hns3: Rename loop mode
Date: Wed, 26 Sep 2018 19:28:33 +0100 [thread overview]
Message-ID: <20180926182840.28392-4-salil.mehta@huawei.com> (raw)
In-Reply-To: <20180926182840.28392-1-salil.mehta@huawei.com>
From: Fuyun Liang <liangfuyun1@huawei.com>
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 <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
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 564afd4..03d7878 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 8803a87..86587cf 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 2de5a00..33e97fc 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.7.4
next prev parent reply other threads:[~2018-09-26 18:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 18:28 [PATCH net-next 00/10] Cleanups, minor additions & fixes for HNS3 driver Salil Mehta
2018-09-26 18:28 ` [PATCH net-next 01/10] net: hns3: Add support for sctp checksum offload Salil Mehta
2018-09-26 18:28 ` [PATCH net-next 02/10] net: hns3: Set extra mac address of pause param for HW Salil Mehta
2018-09-26 18:28 ` Salil Mehta [this message]
2018-09-26 18:28 ` [PATCH net-next 04/10] net: hns3: Rename mac loopback to app loopback Salil Mehta
2018-09-26 18:28 ` [PATCH net-next 05/10] net: hns3: Add serdes parallel inner loopback support Salil Mehta
2018-09-26 18:28 ` [PATCH net-next 06/10] net: hns3: Fix for packet buffer setting bug Salil Mehta
2018-09-26 18:28 ` [PATCH net-next 07/10] net: hns3: Fix for netdev not up problem when setting mtu Salil Mehta
2018-09-26 18:28 ` [PATCH net-next 08/10] net: hns3: Change return type of hclge_tm_schd_info_update() Salil Mehta
2018-09-26 18:28 ` [PATCH net-next 09/10] net: hns3: Modify hns3_get_max_available_channels Salil Mehta
2018-09-26 18:28 ` [PATCH net-next 10/10] net: hns3: Fix loss of coal configuration while doing reset Salil Mehta
2018-09-28 17:38 ` [PATCH net-next 00/10] Cleanups, minor additions & fixes for HNS3 driver David Miller
2018-09-28 18:56 ` Eric Dumazet
2018-09-29 15:09 ` Salil Mehta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180926182840.28392-4-salil.mehta@huawei.com \
--to=salil.mehta@huawei.com \
--cc=davem@davemloft.net \
--cc=liangfuyun1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=mehta.salil@opnsrc.net \
--cc=netdev@vger.kernel.org \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).