Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7665de15 authored by Somnath Kotur's avatar Somnath Kotur Committed by David S. Miller
Browse files

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: default avatarSomnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89b1f496
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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++;