]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla4xxx: remove unnecessary read of PCI_CAP_ID_EXP
authorJon Mason <jdmason@kudzu.us>
Tue, 10 Jul 2012 21:57:55 +0000 (14:57 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 12 Nov 2012 10:51:19 +0000 (02:51 -0800)
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>
Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_nx.c

index f4116dc46c0734de07a09dbe6684582631a57b1d..eb058bca585ffbe1eb617d1f1632f14dcd3687a7 100644 (file)
@@ -1609,7 +1609,7 @@ qla4_8xxx_start_firmware(struct scsi_qla_host *ha, uint32_t image_start)
        }
 
        /* Negotiated Link width */
-       pcie_cap = pci_find_capability(ha->pdev, PCI_CAP_ID_EXP);
+       pcie_cap = pci_pcie_cap(ha->pdev);
        pci_read_config_word(ha->pdev, pcie_cap + PCI_EXP_LNKSTA, &lnk);
        ha->link_width = (lnk >> 4) & 0x3f;