From: Jon Mason Date: Wed, 11 Sep 2013 22:38:13 +0000 (-0700) Subject: [SCSI] lpfc: remove unnecessary read of PCI_CAP_ID_EXP X-Git-Tag: next-20131017~16^2~69 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ae1d884d9e211bf27f9c7e129be9221636bc1198;p=karo-tx-linux.git [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 Acked-by: James Smart Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 647f5bfb3bd3..ca6bf2af7ce8 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;