diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-12-15 22:31:30 +0100 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-01-10 23:12:18 +0100 |
commit | fdabc3fe998203038a78763c1b3d6ace517e0eea (patch) | |
tree | c80b8030c941394e583a2af4dd9894046ba850e5 /arch | |
parent | hinic: Replace PCI pool old API (diff) | |
download | linux-fdabc3fe998203038a78763c1b3d6ace517e0eea.tar.xz linux-fdabc3fe998203038a78763c1b3d6ace517e0eea.zip |
PCI: Add #defines for Completion Timeout Disable feature
Add #defines for the Completion Timeout Disable feature and use them. No
functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/powernv/eeh-powernv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c index 4650fb294e7a..2f7cd0ef3cdc 100644 --- a/arch/powerpc/platforms/powernv/eeh-powernv.c +++ b/arch/powerpc/platforms/powernv/eeh-powernv.c @@ -1654,14 +1654,14 @@ static int pnv_eeh_restore_vf_config(struct pci_dn *pdn) eeh_ops->write_config(pdn, edev->pcie_cap + PCI_EXP_DEVCTL, 2, devctl); - /* Disable Completion Timeout */ + /* Disable Completion Timeout if possible */ eeh_ops->read_config(pdn, edev->pcie_cap + PCI_EXP_DEVCAP2, 4, &cap2); - if (cap2 & 0x10) { + if (cap2 & PCI_EXP_DEVCAP2_COMP_TMOUT_DIS) { eeh_ops->read_config(pdn, edev->pcie_cap + PCI_EXP_DEVCTL2, 4, &cap2); - cap2 |= 0x10; + cap2 |= PCI_EXP_DEVCTL2_COMP_TMOUT_DIS; eeh_ops->write_config(pdn, edev->pcie_cap + PCI_EXP_DEVCTL2, 4, cap2); |