Skip to content

Commit

Permalink
mlx4: remove unnecessary read of PCI_CAP_ID_EXP
Browse files Browse the repository at this point in the history
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jon Mason authored and David S. Miller committed Jun 28, 2011
1 parent 708ebb3 commit a875a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mlx4/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int mlx4_reset(struct mlx4_dev *dev)
goto out;
}

pcie_cap = pci_find_capability(dev->pdev, PCI_CAP_ID_EXP);
pcie_cap = pci_pcie_cap(dev->pdev);

for (i = 0; i < 64; ++i) {
if (i == 22 || i == 23)
Expand Down

0 comments on commit a875a4c

Please sign in to comment.