1 #ifndef LINUX_PCI_ATS_H
2 #define LINUX_PCI_ATS_H
4 /* Address Translation Service */
6 int pos; /* capability position */
7 int stu; /* Smallest Translation Unit */
8 int qdep; /* Invalidate Queue Depth */
9 int ref_cnt; /* Physical Function reference count */
10 unsigned int is_enabled:1; /* Enable bit is set */
15 extern int pci_enable_ats(struct pci_dev *dev, int ps);
16 extern void pci_disable_ats(struct pci_dev *dev);
17 extern int pci_ats_queue_depth(struct pci_dev *dev);
19 * pci_ats_enabled - query the ATS status
20 * @dev: the PCI device
22 * Returns 1 if ATS capability is enabled, or 0 if not.
24 static inline int pci_ats_enabled(struct pci_dev *dev)
26 return dev->ats && dev->ats->is_enabled;
29 #else /* CONFIG_PCI_IOV */
31 static inline int pci_enable_ats(struct pci_dev *dev, int ps)
36 static inline void pci_disable_ats(struct pci_dev *dev)
40 static inline int pci_ats_queue_depth(struct pci_dev *dev)
45 static inline int pci_ats_enabled(struct pci_dev *dev)
50 #endif /* CONFIG_PCI_IOV */
52 #endif /* LINUX_PCI_ATS_H*/