summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be_main.c
diff options
context:
space:
mode:
authorVasundhara Volam2012-08-28 22:37:41 +0200
committerDavid S. Miller2012-08-30 19:27:05 +0200
commit7c5a524221dc3cf599a6aa4773eb0c1e2ca38adb (patch)
tree1e93f61b2a250b70b9c5f5f020692f6a4ab92e57 /drivers/net/ethernet/emulex/benet/be_main.c
parentbe2net: create RSS rings even in multi-channel configs (diff)
downloadkernel-qcow2-linux-7c5a524221dc3cf599a6aa4773eb0c1e2ca38adb.tar.gz
kernel-qcow2-linux-7c5a524221dc3cf599a6aa4773eb0c1e2ca38adb.tar.xz
kernel-qcow2-linux-7c5a524221dc3cf599a6aa4773eb0c1e2ca38adb.zip
be2net: fix max VFs reported by HW
BE3 FW allocates VF resources for upto 30 VFs per PF while a max value of 32 may be reported via PCI config space. Fix this in the driver. 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_main.c')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index d86d25cc33cf..def2f6688964 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -2723,6 +2723,8 @@ static int be_get_config(struct be_adapter *adapter)
if (pos) {
pci_read_config_word(adapter->pdev, pos + PCI_SRIOV_TOTAL_VF,
&dev_num_vfs);
+ if (!lancer_chip(adapter))
+ dev_num_vfs = min_t(u16, dev_num_vfs, MAX_VFS);
adapter->dev_num_vfs = dev_num_vfs;
}
return 0;