summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_main.c
diff options
context:
space:
mode:
authorJon Mason2011-06-27 19:39:54 +0200
committerRoland Dreier2011-07-18 21:01:22 +0200
commit9b89925c0d8f7d1cc203682df4fab847a7b4b7ec (patch)
tree893fd9d8e76a777a3c4cdfd2e89afdbea28b9a51 /drivers/infiniband/hw/mthca/mthca_main.c
parentIB/mthca: Stop returning separate error and status from FW commands (diff)
downloadkernel-qcow2-linux-9b89925c0d8f7d1cc203682df4fab847a7b4b7ec.tar.gz
kernel-qcow2-linux-9b89925c0d8f7d1cc203682df4fab847a7b4b7ec.tar.xz
kernel-qcow2-linux-9b89925c0d8f7d1cc203682df4fab847a7b4b7ec.zip
IB/mthca: 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. Also, pci_is_pcie is a better way of determining if the device is PCIE or not (as it uses the same saved PCIE capability offset). Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_main.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index f9834766e37b..aa12a533ae9e 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -149,7 +149,7 @@ static int mthca_tune_pci(struct mthca_dev *mdev)
} else if (!(mdev->mthca_flags & MTHCA_FLAG_PCIE))
mthca_info(mdev, "No PCI-X capability, not setting RBC.\n");
- if (pci_find_capability(mdev->pdev, PCI_CAP_ID_EXP)) {
+ if (pci_is_pcie(mdev->pdev)) {
if (pcie_set_readrq(mdev->pdev, 4096)) {
mthca_err(mdev, "Couldn't write PCI Express read request, "
"aborting.\n");