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: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
static void be_sriov_enable(struct be_adapter *adapter)
{
-#ifdef CONFIG_PCI_IOV
- int status;
be_check_sriov_fn_type(adapter);
+#ifdef CONFIG_PCI_IOV
if (be_physfn(adapter) && num_vfs) {
+ int status;
+
status = pci_enable_sriov(adapter->pdev, num_vfs);
adapter->sriov_enabled = status ? false : true;
}