diff options
author | Vasundhara Volam <vasundhara.volam@emulex.com> | 2013-10-01 14:29:56 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-01 20:45:51 +0400 |
commit | b905b5d4d93d0b88fcd1d3bcd76d238d9401bc31 (patch) | |
tree | 471ab33c3dc2cfdf26d5a054713b506097205d7d /drivers/net/ethernet/emulex/benet/be.h | |
parent | b85f75ea040223519101eb97ee95e23470a73b71 (diff) | |
download | linux-b905b5d4d93d0b88fcd1d3bcd76d238d9401bc31.tar.xz |
be2net: Call be_vf_setup() even when VFs are enbaled from previous load
Re-define the sriov_want() macro to check for number of VFs that need
to be enabled in the current load of the driver or the number of VFs that
still remain enabled from the previous load (attached VFs cannot be disabled.)
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 4a0d3b786288..4a540aff698c 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -470,8 +470,8 @@ struct be_adapter { #define be_physfn(adapter) (!adapter->virtfn) #define sriov_enabled(adapter) (adapter->num_vfs > 0) -#define sriov_want(adapter) (be_max_vfs(adapter) && num_vfs && \ - be_physfn(adapter)) +#define sriov_want(adapter) (be_physfn(adapter) && \ + (num_vfs || pci_num_vf(adapter->pdev))) #define for_all_vfs(adapter, vf_cfg, i) \ for (i = 0, vf_cfg = &adapter->vf_cfg[i]; i < adapter->num_vfs; \ i++, vf_cfg++) |