diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2019-01-18 16:13:13 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-18 15:10:22 -0800 |
commit | af013903c5c5dc4a251e0ac49eaab9411293f9f9 (patch) | |
tree | 09279ed95ecc17581dc3d984c3e5dff7f89a09fa /drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | |
parent | c3b9c50d1567aa12be4448fe85b09626eba2499c (diff) | |
download | talos-op-linux-af013903c5c5dc4a251e0ac49eaab9411293f9f9.tar.gz talos-op-linux-af013903c5c5dc4a251e0ac49eaab9411293f9f9.zip |
net: hns3: do reinitialization while ETS configuration changed
When the ETS information is changed, the network device needs to be
re-initialized, otherwise the information such as the receiving queue
will be incorrect.
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_enet.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 0bda9bd8ecc1..10cc86533885 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3728,7 +3728,6 @@ static int hns3_client_setup_tc(struct hnae3_handle *handle, u8 tc) { struct hnae3_knic_private_info *kinfo = &handle->kinfo; struct net_device *ndev = kinfo->netdev; - bool if_running; int ret; if (tc > HNAE3_MAX_TC) @@ -3737,24 +3736,13 @@ static int hns3_client_setup_tc(struct hnae3_handle *handle, u8 tc) if (!ndev) return -ENODEV; - if_running = netif_running(ndev); - - if (if_running) { - (void)hns3_nic_net_stop(ndev); - msleep(100); - } - ret = (kinfo->dcb_ops && kinfo->dcb_ops->map_update) ? kinfo->dcb_ops->map_update(handle) : -EOPNOTSUPP; if (ret) - goto err_out; + return ret; ret = hns3_nic_set_real_num_queue(ndev); -err_out: - if (if_running) - (void)hns3_nic_net_open(ndev); - return ret; } |