]> Pileus Git - ~andy/linux/commitdiff
[SCSI] lpfc: remove unnecessary read of PCI_CAP_ID_EXP
authorJon Mason <jdmason@kudzu.us>
Wed, 11 Sep 2013 22:38:13 +0000 (15:38 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 25 Oct 2013 08:57:55 +0000 (09:57 +0100)
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>
drivers/scsi/lpfc/lpfc_init.c

index 647f5bfb3bd33f312135a869b8ee0793a879a7a8..ca6bf2af7ce8b7b0fb8a657f1f511f33f44f5028 100644 (file)
@@ -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;