提交 6dedec81 编写于 作者: A Ajit Khaparde 提交者: David S. Miller

be2net: fix to correctly know if driver needs to run for a VF or a PF

Move be_check_sriov_fn_type to appropriate place to correctly determine
if the be2net driver needs to work as a VF driver or a PF driver.
Signed-off-by: NAjit Khaparde <ajitk@serverengines.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 060b946c
...@@ -1717,10 +1717,11 @@ static void be_msix_enable(struct be_adapter *adapter) ...@@ -1717,10 +1717,11 @@ static void be_msix_enable(struct be_adapter *adapter)
static void be_sriov_enable(struct be_adapter *adapter) static void be_sriov_enable(struct be_adapter *adapter)
{ {
#ifdef CONFIG_PCI_IOV
int status;
be_check_sriov_fn_type(adapter); be_check_sriov_fn_type(adapter);
#ifdef CONFIG_PCI_IOV
if (be_physfn(adapter) && num_vfs) { if (be_physfn(adapter) && num_vfs) {
int status;
status = pci_enable_sriov(adapter->pdev, num_vfs); status = pci_enable_sriov(adapter->pdev, num_vfs);
adapter->sriov_enabled = status ? false : true; adapter->sriov_enabled = status ? false : true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册