Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328401
b: refs/heads/master
c: 2f6a026
h: refs/heads/master
i:
  328399: e975254
v: v3
  • Loading branch information
Ivan Vecera authored and David S. Miller committed Oct 1, 2012
1 parent af0da2b commit dc80a61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: f4b549a5ac818722fc13d789584f41f4e00d78b5
refs/heads/master: 2f6a02604e962295569749913081365ec9ec1372
6 changes: 2 additions & 4 deletions trunk/drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,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, vf_fn;
int vfs = 0, assigned_vfs = 0, pos;
u16 offset, stride;

pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV);
Expand All @@ -1086,9 +1086,7 @@ 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 &&
dev->bus->number == pdev->bus->number) {
if (dev->is_virtfn && pci_physfn(dev) == pdev) {
vfs++;
if (dev->dev_flags & PCI_DEV_FLAGS_ASSIGNED)
assigned_vfs++;
Expand Down

0 comments on commit dc80a61

Please sign in to comment.