Skip to contentSkip to conversation

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

PATCH Applied Ajit Khaparde 2 participants 2 messages Jul 29, 2010 – Jul 31, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 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.

---
 drivers/net/benet/be_main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/benet/be_main.c +3 -2
index d5b097d..e72b482 100644
@@ -1717,10 +1717,11 @@ static void be_msix_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);
+#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;
 	}
Signature · 1 line
1.7.0.4