]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: hns3: Rename loop mode
authorFuyun Liang <liangfuyun1@huawei.com>
Wed, 26 Sep 2018 18:28:33 +0000 (19:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Sep 2018 17:37:41 +0000 (10:37 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 564afd4c1323b2355dae6323643fda2c6e5e9991..03d7878c61684781dd12da3f781cd05f43169862 100644 (file)
@@ -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 {
index 8803a8721c8e635ec45be1cce9b782675f9eb424..86587cf2a6760a9806d80c938d67c55d575f58e1 100644 (file)
@@ -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)
index 2de5a0061dc9e488bdb26815d1d8094e4389d24c..33e97fcfe74e70d5b08377bf548f696a8deb4c17 100644 (file)
@@ -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: