aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf
diff options
context:
space:
mode:
authorGuangbin Huang <huangguangbin2@huawei.com>2021-08-28 14:55:19 +0800
committerDavid S. Miller <davem@davemloft.net>2021-08-28 11:20:05 +0100
commit7f2f8cf6ef668c1c745e229023f98663f47aa702 (patch)
tree742180d5708cb9a85467439aa4e9945f5b16e411 /drivers/net/ethernet/hisilicon/hns3/hns3pf
parentnet: hns3: add new function hclge_get_speed_bit() (diff)
downloadlinux-dev-7f2f8cf6ef668c1c745e229023f98663f47aa702.tar.xz
linux-dev-7f2f8cf6ef668c1c745e229023f98663f47aa702.zip
net: hns3: don't config TM DWRR twice when set ETS
The function hclge_tm_dwrr_cfg() will be called twice in function hclge_ieee_setets() when map_changed is true, the calling flow is hclge_ieee_setets() hclge_map_update() | hclge_tm_schd_setup_hw() | hclge_tm_dwrr_cfg() hclge_notify_init_up() hclge_tm_dwrr_cfg() It is no need to call hclge_tm_dwrr_cfg() twice actually, so just return after calling hclge_notify_init_up(). Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3pf')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
index 39f56f245d84..127160416ca6 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
@@ -234,9 +234,7 @@ static int hclge_ieee_setets(struct hnae3_handle *h, struct ieee_ets *ets)
if (ret)
goto err_out;
- ret = hclge_notify_init_up(hdev);
- if (ret)
- return ret;
+ return hclge_notify_init_up(hdev);
}
return hclge_tm_dwrr_cfg(hdev);