diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 8e366bb0705f..d304ddf412d0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -196,6 +196,7 @@ struct pci_cap_saved_state { | |||
196 | struct pcie_link_state; | 196 | struct pcie_link_state; |
197 | struct pci_vpd; | 197 | struct pci_vpd; |
198 | struct pci_sriov; | 198 | struct pci_sriov; |
199 | struct pci_ats; | ||
199 | 200 | ||
200 | /* | 201 | /* |
201 | * The pci_dev structure is used to describe PCI devices. | 202 | * The pci_dev structure is used to describe PCI devices. |
@@ -293,6 +294,7 @@ struct pci_dev { | |||
293 | struct pci_sriov *sriov; /* SR-IOV capability related */ | 294 | struct pci_sriov *sriov; /* SR-IOV capability related */ |
294 | struct pci_dev *physfn; /* the PF this VF is associated with */ | 295 | struct pci_dev *physfn; /* the PF this VF is associated with */ |
295 | }; | 296 | }; |
297 | struct pci_ats *ats; /* Address Translation Service */ | ||
296 | #endif | 298 | #endif |
297 | }; | 299 | }; |
298 | 300 | ||
@@ -607,8 +609,6 @@ extern void pci_sort_breadthfirst(void); | |||
607 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, | 609 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, |
608 | unsigned int device, | 610 | unsigned int device, |
609 | struct pci_dev *from); | 611 | struct pci_dev *from); |
610 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, | ||
611 | unsigned int devfn); | ||
612 | #endif /* CONFIG_PCI_LEGACY */ | 612 | #endif /* CONFIG_PCI_LEGACY */ |
613 | 613 | ||
614 | enum pci_lost_interrupt_reason { | 614 | enum pci_lost_interrupt_reason { |
@@ -647,6 +647,7 @@ int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn, | |||
647 | int where, u16 val); | 647 | int where, u16 val); |
648 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, | 648 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, |
649 | int where, u32 val); | 649 | int where, u32 val); |
650 | struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); | ||
650 | 651 | ||
651 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) | 652 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) |
652 | { | 653 | { |
@@ -711,8 +712,8 @@ int pcix_get_mmrbc(struct pci_dev *dev); | |||
711 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 712 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
712 | int pcie_get_readrq(struct pci_dev *dev); | 713 | int pcie_get_readrq(struct pci_dev *dev); |
713 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 714 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
715 | int __pci_reset_function(struct pci_dev *dev); | ||
714 | int pci_reset_function(struct pci_dev *dev); | 716 | int pci_reset_function(struct pci_dev *dev); |
715 | int pci_execute_reset_function(struct pci_dev *dev); | ||
716 | void pci_update_resource(struct pci_dev *dev, int resno); | 717 | void pci_update_resource(struct pci_dev *dev, int resno); |
717 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 718 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
718 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | 719 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); |
@@ -732,7 +733,7 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
732 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 733 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
733 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | 734 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); |
734 | void pci_pme_active(struct pci_dev *dev, bool enable); | 735 | void pci_pme_active(struct pci_dev *dev, bool enable); |
735 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 736 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); |
736 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); | 737 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); |
737 | pci_power_t pci_target_state(struct pci_dev *dev); | 738 | pci_power_t pci_target_state(struct pci_dev *dev); |
738 | int pci_prepare_to_sleep(struct pci_dev *dev); | 739 | int pci_prepare_to_sleep(struct pci_dev *dev); |
@@ -798,7 +799,7 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, | |||
798 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | 799 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, |
799 | int pass); | 800 | int pass); |
800 | 801 | ||
801 | void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), | 802 | void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), |
802 | void *userdata); | 803 | void *userdata); |
803 | int pci_cfg_space_size_ext(struct pci_dev *dev); | 804 | int pci_cfg_space_size_ext(struct pci_dev *dev); |
804 | int pci_cfg_space_size(struct pci_dev *dev); | 805 | int pci_cfg_space_size(struct pci_dev *dev); |
@@ -888,6 +889,17 @@ static inline int pcie_aspm_enabled(void) | |||
888 | extern int pcie_aspm_enabled(void); | 889 | extern int pcie_aspm_enabled(void); |
889 | #endif | 890 | #endif |
890 | 891 | ||
892 | #ifndef CONFIG_PCIE_ECRC | ||
893 | static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | ||
894 | { | ||
895 | return; | ||
896 | } | ||
897 | static inline void pcie_ecrc_get_policy(char *str) {}; | ||
898 | #else | ||
899 | extern void pcie_set_ecrc_checking(struct pci_dev *dev); | ||
900 | extern void pcie_ecrc_get_policy(char *str); | ||
901 | #endif | ||
902 | |||
891 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 903 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) |
892 | 904 | ||
893 | #ifdef CONFIG_HT_IRQ | 905 | #ifdef CONFIG_HT_IRQ |
@@ -944,12 +956,6 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor, | |||
944 | return NULL; | 956 | return NULL; |
945 | } | 957 | } |
946 | 958 | ||
947 | static inline struct pci_dev *pci_find_slot(unsigned int bus, | ||
948 | unsigned int devfn) | ||
949 | { | ||
950 | return NULL; | ||
951 | } | ||
952 | |||
953 | static inline struct pci_dev *pci_get_device(unsigned int vendor, | 959 | static inline struct pci_dev *pci_get_device(unsigned int vendor, |
954 | unsigned int device, | 960 | unsigned int device, |
955 | struct pci_dev *from) | 961 | struct pci_dev *from) |
@@ -1105,6 +1111,10 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, | |||
1105 | 1111 | ||
1106 | #include <asm/pci.h> | 1112 | #include <asm/pci.h> |
1107 | 1113 | ||
1114 | #ifndef PCIBIOS_MAX_MEM_32 | ||
1115 | #define PCIBIOS_MAX_MEM_32 (-1) | ||
1116 | #endif | ||
1117 | |||
1108 | /* these helpers provide future and backwards compatibility | 1118 | /* these helpers provide future and backwards compatibility |
1109 | * for accessing popular PCI BAR info */ | 1119 | * for accessing popular PCI BAR info */ |
1110 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) | 1120 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) |
@@ -1261,5 +1271,10 @@ static inline irqreturn_t pci_sriov_migration(struct pci_dev *dev) | |||
1261 | } | 1271 | } |
1262 | #endif | 1272 | #endif |
1263 | 1273 | ||
1274 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) | ||
1275 | extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | ||
1276 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | ||
1277 | #endif | ||
1278 | |||
1264 | #endif /* __KERNEL__ */ | 1279 | #endif /* __KERNEL__ */ |
1265 | #endif /* LINUX_PCI_H */ | 1280 | #endif /* LINUX_PCI_H */ |