Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5548bfd0 authored by Jiang Liu's avatar Jiang Liu Committed by Bjorn Helgaas
Browse files

[SCSI] qla4xxx: Use PCI Express Capability accessors



Use PCI Express Capability access functions to simplify qla4xxx driver.

Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 10092438
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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 */