summaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-06-13 11:01:51 -0500
committerBjorn Helgaas <bhelgaas@google.com>2016-08-18 16:04:57 -0500
commiteec097d43100a8195fd4f678671ecd5d986dd675 (patch)
treeec874686b415958f9123b68f4ba0f85bae6b8c86 /include/linux/pci.h
parent9bb04a0c4e261187be904d05c2bcd1da0eebc20c (diff)
downloadop-kernel-dev-eec097d43100a8195fd4f678671ecd5d986dd675.zip
op-kernel-dev-eec097d43100a8195fd4f678671ecd5d986dd675.tar.gz
PCI: Add pci_enable_ptm() for drivers to enable PTM on endpoints
Add an pci_enable_ptm() interface so drivers can enable PTM. The PCI core enables PTM on PTM Roots and switches automatically, but we don't enable PTM on endpoints unless a driver requests it. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 96c509f..9e4b6d6 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1407,6 +1407,13 @@ static inline void pci_disable_ats(struct pci_dev *d) { }
static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; }
#endif
+#ifdef CONFIG_PCIE_PTM
+int pci_enable_ptm(struct pci_dev *dev, u8 *granularity);
+#else
+static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity)
+{ return -EINVAL; }
+#endif
+
void pci_cfg_access_lock(struct pci_dev *dev);
bool pci_cfg_access_trylock(struct pci_dev *dev);
void pci_cfg_access_unlock(struct pci_dev *dev);
OpenPOWER on IntegriCloud