提交 466b3ddf 编写于 作者: J Joerg Roedel 提交者: Jesse Barnes

PCI: Fix compile errors with PCI_ATS and !PCI_IOV

The ats and sroiv members of 'struct pci_dev' are required
for the ATS code already, even without IOV support compiled
in. So depend on ATS here. This is fine with PCI_IOV too
because it selects PCI_ATS. Also the prototypes for ATS
need to be available for PCI_ATS.
Reported-by: NRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 0d52f54e
...@@ -12,7 +12,7 @@ struct pci_ats { ...@@ -12,7 +12,7 @@ struct pci_ats {
unsigned int is_enabled:1; /* Enable bit is set */ unsigned int is_enabled:1; /* Enable bit is set */
}; };
#ifdef CONFIG_PCI_IOV #ifdef CONFIG_PCI_ATS
extern int pci_enable_ats(struct pci_dev *dev, int ps); extern int pci_enable_ats(struct pci_dev *dev, int ps);
extern void pci_disable_ats(struct pci_dev *dev); extern void pci_disable_ats(struct pci_dev *dev);
...@@ -29,7 +29,7 @@ static inline int pci_ats_enabled(struct pci_dev *dev) ...@@ -29,7 +29,7 @@ static inline int pci_ats_enabled(struct pci_dev *dev)
return dev->ats && dev->ats->is_enabled; return dev->ats && dev->ats->is_enabled;
} }
#else /* CONFIG_PCI_IOV */ #else /* CONFIG_PCI_ATS */
static inline int pci_enable_ats(struct pci_dev *dev, int ps) static inline int pci_enable_ats(struct pci_dev *dev, int ps)
{ {
...@@ -50,7 +50,7 @@ static inline int pci_ats_enabled(struct pci_dev *dev) ...@@ -50,7 +50,7 @@ static inline int pci_ats_enabled(struct pci_dev *dev)
return 0; return 0;
} }
#endif /* CONFIG_PCI_IOV */ #endif /* CONFIG_PCI_ATS */
#ifdef CONFIG_PCI_PRI #ifdef CONFIG_PCI_PRI
......
...@@ -338,7 +338,7 @@ struct pci_dev { ...@@ -338,7 +338,7 @@ struct pci_dev {
struct list_head msi_list; struct list_head msi_list;
#endif #endif
struct pci_vpd *vpd; struct pci_vpd *vpd;
#ifdef CONFIG_PCI_IOV #ifdef CONFIG_PCI_ATS
union { union {
struct pci_sriov *sriov; /* SR-IOV capability related */ struct pci_sriov *sriov; /* SR-IOV capability related */
struct pci_dev *physfn; /* the PF this VF is associated with */ struct pci_dev *physfn; /* the PF this VF is associated with */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册