Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328122
b: refs/heads/master
c: d9f72f3
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Sep 28, 2012
1 parent 87a7560 commit 70e616f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 404f7c9e118e0c92902afe1853d35f5638fe4a4c
refs/heads/master: d9f72f359e00a45a6cd7cc2d5121b04b9dc927e1
6 changes: 4 additions & 2 deletions trunk/drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ static int be_set_vf_tx_rate(struct net_device *netdev,
static int be_find_vfs(struct be_adapter *adapter, int vf_state)
{
struct pci_dev *dev, *pdev = adapter->pdev;
int vfs = 0, assigned_vfs = 0, pos;
int vfs = 0, assigned_vfs = 0, pos, vf_fn;
u16 offset, stride;

pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV);
Expand All @@ -1087,7 +1087,9 @@ static int be_find_vfs(struct be_adapter *adapter, int vf_state)

dev = pci_get_device(pdev->vendor, PCI_ANY_ID, NULL);
while (dev) {
if (dev->is_virtfn && dev->physfn == pdev) {
vf_fn = (pdev->devfn + offset + stride * vfs) & 0xFFFF;
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++;
Expand Down

0 comments on commit 70e616f

Please sign in to comment.