mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 13:55:09 +07:00
net: hns3: Rename loop mode
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>
This commit is contained in:
parent
cd2086bf49
commit
a7b687b354
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user