1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright IBM Corp. 2020
4 *
5 * Author(s):
6 * Niklas Schnelle <schnelle@linux.ibm.com>
7 *
8 */
9
10 #ifndef __S390_PCI_IOV_H
11 #define __S390_PCI_IOV_H
12
13 #ifdef CONFIG_PCI_IOV
14 void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn);
15
16 void zpci_iov_map_resources(struct pci_dev *pdev);
17
18 int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn);
19
20 struct pci_dev *zpci_iov_find_parent_pf(struct zpci_bus *zbus, struct zpci_dev *zdev);
21
22 #else /* CONFIG_PCI_IOV */
zpci_iov_remove_virtfn(struct pci_dev * pdev,int vfn)23 static inline void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn) {}
24
zpci_iov_map_resources(struct pci_dev * pdev)25 static inline void zpci_iov_map_resources(struct pci_dev *pdev) {}
26
zpci_iov_setup_virtfn(struct zpci_bus * zbus,struct pci_dev * virtfn,int vfn)27 static inline int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
28 {
29 return 0;
30 }
31
zpci_iov_find_parent_pf(struct zpci_bus * zbus,struct zpci_dev * zdev)32 static inline struct pci_dev *zpci_iov_find_parent_pf(struct zpci_bus *zbus, struct zpci_dev *zdev)
33 {
34 return NULL;
35 }
36 #endif /* CONFIG_PCI_IOV */
37 #endif /* __S390_PCI_IOV_h */
38