diff options
author | Ajit Khaparde <ajitk@serverengines.com> | 2010-07-29 02:15:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-31 02:59:05 -0400 |
commit | 6dedec818ac2a3783581a761b0680e713f78afde (patch) | |
tree | aa5d5308dae532e901577c8b9de1b764770c1ab5 /drivers/net/benet/be_main.c | |
parent | 060b946cc28682620667c33cb145094c763078be (diff) |
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: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r-- | drivers/net/benet/be_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index d5b097d836b9..e72b482c4327 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -1717,10 +1717,11 @@ static void be_msix_enable(struct be_adapter *adapter) | |||
1717 | 1717 | ||
1718 | static void be_sriov_enable(struct be_adapter *adapter) | 1718 | static void be_sriov_enable(struct be_adapter *adapter) |
1719 | { | 1719 | { |
1720 | #ifdef CONFIG_PCI_IOV | ||
1721 | int status; | ||
1722 | be_check_sriov_fn_type(adapter); | 1720 | be_check_sriov_fn_type(adapter); |
1721 | #ifdef CONFIG_PCI_IOV | ||
1723 | if (be_physfn(adapter) && num_vfs) { | 1722 | if (be_physfn(adapter) && num_vfs) { |
1723 | int status; | ||
1724 | |||
1724 | status = pci_enable_sriov(adapter->pdev, num_vfs); | 1725 | status = pci_enable_sriov(adapter->pdev, num_vfs); |
1725 | adapter->sriov_enabled = status ? false : true; | 1726 | adapter->sriov_enabled = status ? false : true; |
1726 | } | 1727 | } |