From: Hao Chen chenhao418@huawei.com
driver inclusion category:feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9A3QT CVE: NA
----------------------------------------------------------------------
Now, hns3 driver set request_enable to qb_en whether hclge_set_fd_qb() returns failure, it's incorrect.
We only set request_enable to qb_en when hclge_set_fd_qb() returns 0. so, change it.
Fixes: b7e2927acb2a ("net: hns3: add queue bonding mode support for VF") Signed-off-by: Hao Chen chenhao418@huawei.com Signed-off-by: Jiantao Xiao xiaojiantao1@h-partners.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index c61bbba50e34..2a234746243d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4700,7 +4700,8 @@ static int hclge_sync_vf_qb_mode(struct hclge_vport *vport) ret = hclge_set_fd_qb(hdev, vport->vport_id, request_enable); if (ret) set_bit(HCLGE_VPORT_STATE_QB_CHANGE, &vport->state); - vport->vf_info.qb_en = request_enable ? 1 : 0; + else + vport->vf_info.qb_en = request_enable ? 1 : 0;
return ret; }