]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
be2net: Regression bug wherein VFs creation broken for multiple cards.
authorSomnath Kotur <somnath.kotur@emulex.com>
Sun, 24 Jun 2012 19:42:00 +0000 (19:42 +0000)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 27 Aug 2012 14:06:29 +0000 (07:06 -0700)
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>
drivers/net/benet/be_main.c

index 2890c971d0e9c1c3e8ac7b0bbc502d033d798ad8..d642d75225bf8ac1def9116004202d1dcd0f4778 100644 (file)
@@ -1033,7 +1033,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++;