Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Joerg Roedel and committed by
Jesse Barnes
466b3ddf 0d52f54e

+4 -4
+3 -3
include/linux/pci-ats.h
··· 12 12 unsigned int is_enabled:1; /* Enable bit is set */ 13 13 }; 14 14 15 - #ifdef CONFIG_PCI_IOV 15 + #ifdef CONFIG_PCI_ATS 16 16 17 17 extern int pci_enable_ats(struct pci_dev *dev, int ps); 18 18 extern void pci_disable_ats(struct pci_dev *dev); ··· 29 29 return dev->ats && dev->ats->is_enabled; 30 30 } 31 31 32 - #else /* CONFIG_PCI_IOV */ 32 + #else /* CONFIG_PCI_ATS */ 33 33 34 34 static inline int pci_enable_ats(struct pci_dev *dev, int ps) 35 35 { ··· 50 50 return 0; 51 51 } 52 52 53 - #endif /* CONFIG_PCI_IOV */ 53 + #endif /* CONFIG_PCI_ATS */ 54 54 55 55 #ifdef CONFIG_PCI_PRI 56 56
+1 -1
include/linux/pci.h
··· 338 338 struct list_head msi_list; 339 339 #endif 340 340 struct pci_vpd *vpd; 341 - #ifdef CONFIG_PCI_IOV 341 + #ifdef CONFIG_PCI_ATS 342 342 union { 343 343 struct pci_sriov *sriov; /* SR-IOV capability related */ 344 344 struct pci_dev *physfn; /* the PF this VF is associated with */