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

Commit 3c55569b authored by Jiang Liu's avatar Jiang Liu Committed by Bjorn Helgaas
Browse files

IB/mthca: Use PCI Express Capability accessors



Use PCI Express Capability access functions to simplify mthca driver.

Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarRoland Dreier <roland@purestorage.com>
parent 332badc3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ good:

	if (hca_pcie_cap) {
		devctl = hca_header[(hca_pcie_cap + PCI_EXP_DEVCTL) / 4];
		if (pci_write_config_word(mdev->pdev, hca_pcie_cap + PCI_EXP_DEVCTL,
		if (pcie_capability_write_word(mdev->pdev, PCI_EXP_DEVCTL,
					       devctl)) {
			err = -ENODEV;
			mthca_err(mdev, "Couldn't restore HCA PCI Express "
@@ -249,7 +249,7 @@ good:
			goto out;
		}
		linkctl = hca_header[(hca_pcie_cap + PCI_EXP_LNKCTL) / 4];
		if (pci_write_config_word(mdev->pdev, hca_pcie_cap + PCI_EXP_LNKCTL,
		if (pcie_capability_write_word(mdev->pdev, PCI_EXP_LNKCTL,
					       linkctl)) {
			err = -ENODEV;
			mthca_err(mdev, "Couldn't restore HCA PCI Express "