rapidio/tsi721: use PCI_EXP_DEVCTL2_COMP_TIMEOUT macro
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 15 Dec 2017 22:15:12 +0000 (16:15 -0600)
committerBjorn Helgaas <helgaas@kernel.org>
Fri, 16 Feb 2018 00:41:06 +0000 (18:41 -0600)
Use the existing PCI_EXP_DEVCTL2_COMP_TIMEOUT macro instead of hard-coding
the PCIe Completion Timeout Value mask.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
drivers/rapidio/devices/tsi721.c

index 9a68914..bb65585 100644 (file)
@@ -2880,8 +2880,9 @@ static int tsi721_probe(struct pci_dev *pdev,
                                 "Invalid MRRS override value %d", pcie_mrrs);
        }
 
-       /* Adjust PCIe completion timeout. */
-       pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL2, 0xf, 0x2);
+       /* Set PCIe completion timeout to 1-10ms */
+       pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL2,
+                                          PCI_EXP_DEVCTL2_COMP_TIMEOUT, 0x2);
 
        /*
         * FIXUP: correct offsets of MSI-X tables in the MSI-X Capability Block