summaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
authorSarveshwar Bandi <sarveshwarb@serverengines.com>2010-07-09 01:43:55 +0000
committerDavid S. Miller <davem@davemloft.net>2010-07-10 19:42:05 -0700
commit344dbf1073d1cea179ed0831547cab2b7ea4ea27 (patch)
tree0963847f46c5b4c7197dc1039081937ac0d934d2 /drivers/net/benet/be_main.c
parent1ebed71ae23b0b3c68d2a03e8e1b421efb7f35b0 (diff)
downloadlinux-344dbf1073d1cea179ed0831547cab2b7ea4ea27.tar.bz2
be2net: Patch to determine if function is VF while running in guest OS.
When driver is loaded in guest OS, the pci variables is_virtfn and is_physfn are both set to 0. This change uses registers in controller to determine the same. Signed-off-by: Sarveshwar Bandi <sarveshwarb@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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index b63687956f2b..e6ca92334d6d 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1631,6 +1631,7 @@ static void be_sriov_enable(struct be_adapter *adapter)
{
#ifdef CONFIG_PCI_IOV
int status;
+ be_check_sriov_fn_type(adapter);
if (be_physfn(adapter) && num_vfs) {
status = pci_enable_sriov(adapter->pdev, num_vfs);
adapter->sriov_enabled = status ? false : true;