瀏覽代碼

mlx4: remove unnecessary read of PCI_CAP_ID_EXP

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>
Jon Mason 14 年之前
父節點
當前提交
a875a4c740
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/mlx4/reset.c

+ 1 - 1
drivers/net/mlx4/reset.c

@@ -77,7 +77,7 @@ int mlx4_reset(struct mlx4_dev *dev)
 		goto out;
 		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) {
 	for (i = 0; i < 64; ++i) {
 		if (i == 22 || i == 23)
 		if (i == 22 || i == 23)