]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/scsi/qla2xxx/qla_nx.c
[SCSI] qla2xxx: remove unnecessary reads of PCI_CAP_ID_EXP
[mirror_ubuntu-bionic-kernel.git] / drivers / scsi / qla2xxx / qla_nx.c
index caf627ba7fa8b3e11a493355bf7a08f120770bcd..9ce3a8f8754f50dacb76efd1e1437cfa84e2d269 100644 (file)
@@ -1620,7 +1620,7 @@ qla82xx_pci_info_str(struct scsi_qla_host *vha, char *str)
        char lwstr[6];
        uint16_t lnk;
 
-       pcie_reg = pci_find_capability(ha->pdev, PCI_CAP_ID_EXP);
+       pcie_reg = pci_pcie_cap(ha->pdev);
        pci_read_config_word(ha->pdev, pcie_reg + PCI_EXP_LNKSTA, &lnk);
        ha->link_width = (lnk >> 4) & 0x3f;
 
@@ -2528,7 +2528,7 @@ qla82xx_start_firmware(scsi_qla_host_t *vha)
        }
 
        /* 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;