提交 709eb41a 编写于 作者: L Lipeng 提交者: David S. Miller

net: hns3: get vf count by pci_sriov_get_totalvfs

This patch gets vf count by standard function pci_sriov_get_totalvfs,
instead of info from NIC HW.
Signed-off-by: NLipeng <lipeng321@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7410343e
......@@ -837,7 +837,6 @@ static int hclge_parse_func_status(struct hclge_dev *hdev,
else
hdev->flag &= ~HCLGE_FLAG_MAIN;
hdev->num_req_vfs = status->vf_num / status->pf_num;
return 0;
}
......@@ -4361,6 +4360,8 @@ static int hclge_pci_init(struct hclge_dev *hdev)
goto err_clr_master;
}
hdev->num_req_vfs = pci_sriov_get_totalvfs(pdev);
return 0;
err_clr_master:
pci_clear_master(pdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册