summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@emulex.com>2012-06-24 21:42:00 +0200
committerDavid S. Miller <davem@davemloft.net>2012-06-26 01:10:11 +0200
commit7665de15642dfb1709177517aa0488162727342c (patch)
tree40088a0b8d84d558f29d31d5f1db74a3ab659b16 /drivers
parentbe2net: Explicitly clear the reserved field in the Tx Descriptor (diff)
downloadlinux-7665de15642dfb1709177517aa0488162727342c.tar.xz
linux-7665de15642dfb1709177517aa0488162727342c.zip
be2net: Regression bug wherein VFs creation broken for multiple cards.
Fix be_find_vfs() to check for matching bus number as well along with devfn Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index c60782e299db..a28896d4411d 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1059,7 +1059,8 @@ static int be_find_vfs(struct be_adapter *adapter, int vf_state)
dev = pci_get_device(pdev->vendor, PCI_ANY_ID, NULL);
while (dev) {
vf_fn = (pdev->devfn + offset + stride * vfs) & 0xFFFF;
- if (dev->is_virtfn && dev->devfn == vf_fn) {
+ if (dev->is_virtfn && dev->devfn == vf_fn &&
+ dev->bus->number == pdev->bus->number) {
vfs++;
if (dev->dev_flags & PCI_DEV_FLAGS_ASSIGNED)
assigned_vfs++;