summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@huawei.com>2012-08-20 20:25:06 (GMT)
committerBjorn Helgaas <bhelgaas@google.com>2012-08-23 16:11:15 (GMT)
commit5548bfd0eef185b76b421c871af7720c65737578 (patch)
tree50b7b85cfd75dab82a5c9c91b645065a652e00d8
parent10092438840729f2bc4892445db949b0e640835f (diff)
downloadlinux-5548bfd0eef185b76b421c871af7720c65737578.tar.xz
[SCSI] qla4xxx: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify qla4xxx driver. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 939d726..807bf76 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -1566,7 +1566,6 @@ qla4_8xxx_set_qsnt_ready(struct scsi_qla_host *ha)
static int
qla4_8xxx_start_firmware(struct scsi_qla_host *ha, uint32_t image_start)
{
- int pcie_cap;
uint16_t lnk;
/* scrub dma mask expansion register */
@@ -1590,8 +1589,7 @@ qla4_8xxx_start_firmware(struct scsi_qla_host *ha, uint32_t image_start)
}
/* Negotiated Link width */
- pcie_cap = pci_pcie_cap(ha->pdev);
- pci_read_config_word(ha->pdev, pcie_cap + PCI_EXP_LNKSTA, &lnk);
+ pcie_capability_read_word(ha->pdev, PCI_EXP_LNKSTA, &lnk);
ha->link_width = (lnk >> 4) & 0x3f;
/* Synchronize with Receive peg */