aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index e63112fb55be..353db8dc4c6e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1178,6 +1178,7 @@ unsigned char pci_bus_max_busnr(struct pci_bus *bus);
1178void pci_setup_bridge(struct pci_bus *bus); 1178void pci_setup_bridge(struct pci_bus *bus);
1179resource_size_t pcibios_window_alignment(struct pci_bus *bus, 1179resource_size_t pcibios_window_alignment(struct pci_bus *bus,
1180 unsigned long type); 1180 unsigned long type);
1181resource_size_t pcibios_iov_resource_alignment(struct pci_dev *dev, int resno);
1181 1182
1182#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0) 1183#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0)
1183#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1) 1184#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1)
@@ -1673,13 +1674,25 @@ int pci_ext_cfg_avail(void);
1673void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); 1674void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
1674 1675
1675#ifdef CONFIG_PCI_IOV 1676#ifdef CONFIG_PCI_IOV
1677int pci_iov_virtfn_bus(struct pci_dev *dev, int id);
1678int pci_iov_virtfn_devfn(struct pci_dev *dev, int id);
1679
1676int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); 1680int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn);
1677void pci_disable_sriov(struct pci_dev *dev); 1681void pci_disable_sriov(struct pci_dev *dev);
1678int pci_num_vf(struct pci_dev *dev); 1682int pci_num_vf(struct pci_dev *dev);
1679int pci_vfs_assigned(struct pci_dev *dev); 1683int pci_vfs_assigned(struct pci_dev *dev);
1680int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); 1684int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs);
1681int pci_sriov_get_totalvfs(struct pci_dev *dev); 1685int pci_sriov_get_totalvfs(struct pci_dev *dev);
1686resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno);
1682#else 1687#else
1688static inline int pci_iov_virtfn_bus(struct pci_dev *dev, int id)
1689{
1690 return -ENOSYS;
1691}
1692static inline int pci_iov_virtfn_devfn(struct pci_dev *dev, int id)
1693{
1694 return -ENOSYS;
1695}
1683static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) 1696static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn)
1684{ return -ENODEV; } 1697{ return -ENODEV; }
1685static inline void pci_disable_sriov(struct pci_dev *dev) { } 1698static inline void pci_disable_sriov(struct pci_dev *dev) { }
@@ -1690,6 +1703,8 @@ static inline int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs)
1690{ return 0; } 1703{ return 0; }
1691static inline int pci_sriov_get_totalvfs(struct pci_dev *dev) 1704static inline int pci_sriov_get_totalvfs(struct pci_dev *dev)
1692{ return 0; } 1705{ return 0; }
1706static inline resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno)
1707{ return 0; }
1693#endif 1708#endif
1694 1709
1695#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) 1710#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)