diff options
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index d03f6b99f292..3c2ec64f78e9 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -229,6 +229,13 @@ struct pci_sriov { | |||
229 | u8 __iomem *mstate; /* VF Migration State Array */ | 229 | u8 __iomem *mstate; /* VF Migration State Array */ |
230 | }; | 230 | }; |
231 | 231 | ||
232 | /* Address Translation Service */ | ||
233 | struct pci_ats { | ||
234 | int pos; /* capability position */ | ||
235 | int stu; /* Smallest Translation Unit */ | ||
236 | int qdep; /* Invalidate Queue Depth */ | ||
237 | }; | ||
238 | |||
232 | #ifdef CONFIG_PCI_IOV | 239 | #ifdef CONFIG_PCI_IOV |
233 | extern int pci_iov_init(struct pci_dev *dev); | 240 | extern int pci_iov_init(struct pci_dev *dev); |
234 | extern void pci_iov_release(struct pci_dev *dev); | 241 | extern void pci_iov_release(struct pci_dev *dev); |
@@ -236,6 +243,20 @@ extern int pci_iov_resource_bar(struct pci_dev *dev, int resno, | |||
236 | enum pci_bar_type *type); | 243 | enum pci_bar_type *type); |
237 | extern void pci_restore_iov_state(struct pci_dev *dev); | 244 | extern void pci_restore_iov_state(struct pci_dev *dev); |
238 | extern int pci_iov_bus_range(struct pci_bus *bus); | 245 | extern int pci_iov_bus_range(struct pci_bus *bus); |
246 | |||
247 | extern int pci_enable_ats(struct pci_dev *dev, int ps); | ||
248 | extern void pci_disable_ats(struct pci_dev *dev); | ||
249 | extern int pci_ats_queue_depth(struct pci_dev *dev); | ||
250 | /** | ||
251 | * pci_ats_enabled - query the ATS status | ||
252 | * @dev: the PCI device | ||
253 | * | ||
254 | * Returns 1 if ATS capability is enabled, or 0 if not. | ||
255 | */ | ||
256 | static inline int pci_ats_enabled(struct pci_dev *dev) | ||
257 | { | ||
258 | return !!dev->ats; | ||
259 | } | ||
239 | #else | 260 | #else |
240 | static inline int pci_iov_init(struct pci_dev *dev) | 261 | static inline int pci_iov_init(struct pci_dev *dev) |
241 | { | 262 | { |
@@ -257,6 +278,22 @@ static inline int pci_iov_bus_range(struct pci_bus *bus) | |||
257 | { | 278 | { |
258 | return 0; | 279 | return 0; |
259 | } | 280 | } |
281 | |||
282 | static inline int pci_enable_ats(struct pci_dev *dev, int ps) | ||
283 | { | ||
284 | return -ENODEV; | ||
285 | } | ||
286 | static inline void pci_disable_ats(struct pci_dev *dev) | ||
287 | { | ||
288 | } | ||
289 | static inline int pci_ats_queue_depth(struct pci_dev *dev) | ||
290 | { | ||
291 | return -ENODEV; | ||
292 | } | ||
293 | static inline int pci_ats_enabled(struct pci_dev *dev) | ||
294 | { | ||
295 | return 0; | ||
296 | } | ||
260 | #endif /* CONFIG_PCI_IOV */ | 297 | #endif /* CONFIG_PCI_IOV */ |
261 | 298 | ||
262 | #endif /* DRIVERS_PCI_H */ | 299 | #endif /* DRIVERS_PCI_H */ |