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.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index af8229244ee2..15472d691ee6 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -333,6 +333,8 @@ struct pci_dev {
333 }; 333 };
334 struct pci_ats *ats; /* Address Translation Service */ 334 struct pci_ats *ats; /* Address Translation Service */
335#endif 335#endif
336 phys_addr_t rom; /* Physical address of ROM if it's not from the BAR */
337 size_t romlen; /* Length of ROM if it's not from the BAR */
336}; 338};
337 339
338static inline struct pci_dev *pci_physfn(struct pci_dev *dev) 340static inline struct pci_dev *pci_physfn(struct pci_dev *dev)
@@ -538,6 +540,9 @@ enum pci_ers_result {
538 540
539 /* Device driver is fully recovered and operational */ 541 /* Device driver is fully recovered and operational */
540 PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5, 542 PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5,
543
544 /* No AER capabilities registered for the driver */
545 PCI_ERS_RESULT_NO_AER_DRIVER = (__force pci_ers_result_t) 6,
541}; 546};
542 547
543/* PCI bus error event callbacks */ 548/* PCI bus error event callbacks */
@@ -573,6 +578,7 @@ struct pci_driver {
573 int (*resume_early) (struct pci_dev *dev); 578 int (*resume_early) (struct pci_dev *dev);
574 int (*resume) (struct pci_dev *dev); /* Device woken up */ 579 int (*resume) (struct pci_dev *dev); /* Device woken up */
575 void (*shutdown) (struct pci_dev *dev); 580 void (*shutdown) (struct pci_dev *dev);
581 int (*sriov_configure) (struct pci_dev *dev, int num_vfs); /* PF pdev */
576 const struct pci_error_handlers *err_handler; 582 const struct pci_error_handlers *err_handler;
577 struct device_driver driver; 583 struct device_driver driver;
578 struct pci_dynids dynids; 584 struct pci_dynids dynids;
@@ -726,6 +732,8 @@ extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
726extern void pci_dev_put(struct pci_dev *dev); 732extern void pci_dev_put(struct pci_dev *dev);
727extern void pci_remove_bus(struct pci_bus *b); 733extern void pci_remove_bus(struct pci_bus *b);
728extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); 734extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
735void pci_stop_root_bus(struct pci_bus *bus);
736void pci_remove_root_bus(struct pci_bus *bus);
729void pci_setup_cardbus(struct pci_bus *bus); 737void pci_setup_cardbus(struct pci_bus *bus);
730extern void pci_sort_breadthfirst(void); 738extern void pci_sort_breadthfirst(void);
731#define dev_is_pci(d) ((d)->bus == &pci_bus_type) 739#define dev_is_pci(d) ((d)->bus == &pci_bus_type)
@@ -970,6 +978,7 @@ void pci_bus_size_bridges(struct pci_bus *bus);
970int pci_claim_resource(struct pci_dev *, int); 978int pci_claim_resource(struct pci_dev *, int);
971void pci_assign_unassigned_resources(void); 979void pci_assign_unassigned_resources(void);
972void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); 980void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge);
981void pci_assign_unassigned_bus_resources(struct pci_bus *bus);
973void pdev_enable_device(struct pci_dev *); 982void pdev_enable_device(struct pci_dev *);
974int pci_enable_resources(struct pci_dev *, int mask); 983int pci_enable_resources(struct pci_dev *, int mask);
975void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), 984void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
@@ -1604,6 +1613,7 @@ void pcibios_disable_device(struct pci_dev *dev);
1604void pcibios_set_master(struct pci_dev *dev); 1613void pcibios_set_master(struct pci_dev *dev);
1605int pcibios_set_pcie_reset_state(struct pci_dev *dev, 1614int pcibios_set_pcie_reset_state(struct pci_dev *dev,
1606 enum pcie_reset_state state); 1615 enum pcie_reset_state state);
1616int pcibios_add_device(struct pci_dev *dev);
1607 1617
1608#ifdef CONFIG_PCI_MMCONFIG 1618#ifdef CONFIG_PCI_MMCONFIG
1609extern void __init pci_mmcfg_early_init(void); 1619extern void __init pci_mmcfg_early_init(void);
@@ -1613,7 +1623,7 @@ static inline void pci_mmcfg_early_init(void) { }
1613static inline void pci_mmcfg_late_init(void) { } 1623static inline void pci_mmcfg_late_init(void) { }
1614#endif 1624#endif
1615 1625
1616int pci_ext_cfg_avail(struct pci_dev *dev); 1626int pci_ext_cfg_avail(void);
1617 1627
1618void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); 1628void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
1619 1629
@@ -1622,6 +1632,8 @@ extern int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn);
1622extern void pci_disable_sriov(struct pci_dev *dev); 1632extern void pci_disable_sriov(struct pci_dev *dev);
1623extern irqreturn_t pci_sriov_migration(struct pci_dev *dev); 1633extern irqreturn_t pci_sriov_migration(struct pci_dev *dev);
1624extern int pci_num_vf(struct pci_dev *dev); 1634extern int pci_num_vf(struct pci_dev *dev);
1635extern int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs);
1636extern int pci_sriov_get_totalvfs(struct pci_dev *dev);
1625#else 1637#else
1626static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) 1638static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn)
1627{ 1639{
@@ -1638,6 +1650,14 @@ static inline int pci_num_vf(struct pci_dev *dev)
1638{ 1650{
1639 return 0; 1651 return 0;
1640} 1652}
1653static inline int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs)
1654{
1655 return 0;
1656}
1657static inline int pci_sriov_get_totalvfs(struct pci_dev *dev)
1658{
1659 return 0;
1660}
1641#endif 1661#endif
1642 1662
1643#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) 1663#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)