summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2013-09-11 15:38:13 -0700
committerJames Bottomley <JBottomley@Parallels.com>2013-10-25 09:57:55 +0100
commit453193e042203e5437c744dd0861bdb3ddc10a0f (patch)
tree989e86904da79af70974d8c9dab1c6cbf577e447 /drivers/scsi/lpfc
parentf79666bbb4ba361aecd36e7796d3b41eee07876e (diff)
downloadop-kernel-dev-453193e042203e5437c744dd0861bdb3ddc10a0f.zip
op-kernel-dev-453193e042203e5437c744dd0861bdb3ddc10a0f.tar.gz
[SCSI] lpfc: 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> Acked-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 647f5bf..ca6bf2a 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -4545,7 +4545,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
pci_save_state(pdev);
/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
- if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
+ if (pci_is_pcie(pdev))
pdev->needs_freset = 1;
return 0;
OpenPOWER on IntegriCloud