Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 2/2] be2net: Regression bug wherein VFs creation broken for multiple cards.
@ 2012-06-25  5:42 Somnath Kotur
  0 siblings, 0 replies; only message in thread
From: Somnath Kotur @ 2012-06-25  5:42 UTC (permalink / raw)
  To: netdev; +Cc: davem, Somnath Kotur

Fix be_find_vfs() to check for matching bus number as well along with devfn

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_main.c |    3 ++-
 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 21e0b5b..4836cc5 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++;
-- 
1.5.6.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-25  5:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25  5:42 [PATCH net-next 2/2] be2net: Regression bug wherein VFs creation broken for multiple cards Somnath Kotur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox