aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-22 14:59:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-22 14:59:51 -0400
commit59ef7a83f1127038a433464597df02e2dc9540e7 (patch)
tree725d262fc2e68eb9c592d76265f878cec73f8f2d /include/linux/pci.h
parent5165aece0efac6574fc3e32b6f1c2a964820d1c6 (diff)
parent2af5066f664cb011cf17d2e4414491fe24597e07 (diff)
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (74 commits) PCI: make msi_free_irqs() to use msix_mask_irq() instead of open coded write PCI: Fix the NIU MSI-X problem in a better way PCI ASPM: remove get_root_port_link PCI ASPM: cleanup pcie_aspm_sanity_check PCI ASPM: remove has_switch field PCI ASPM: cleanup calc_Lx_latency PCI ASPM: cleanup pcie_aspm_get_cap_device PCI ASPM: cleanup clkpm checks PCI ASPM: cleanup __pcie_aspm_check_state_one PCI ASPM: cleanup initialization PCI ASPM: cleanup change input argument of aspm functions PCI ASPM: cleanup misc in struct pcie_link_state PCI ASPM: cleanup clkpm state in struct pcie_link_state PCI ASPM: cleanup latency field in struct pcie_link_state PCI ASPM: cleanup aspm state field in struct pcie_link_state PCI ASPM: fix typo in struct pcie_link_state PCI: drivers/pci/slot.c should depend on CONFIG_SYSFS PCI: remove redundant __msi_set_enable() PCI PM: consistently use type bool for wake enable variable x86/ACPI: Correct maximum allowed _CRS returned resources and warn if exceeded ...
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 8e366bb0705f..1365c745bdb7 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -607,8 +607,6 @@ extern void pci_sort_breadthfirst(void);
607struct pci_dev __deprecated *pci_find_device(unsigned int vendor, 607struct pci_dev __deprecated *pci_find_device(unsigned int vendor,
608 unsigned int device, 608 unsigned int device,
609 struct pci_dev *from); 609 struct pci_dev *from);
610struct pci_dev __deprecated *pci_find_slot(unsigned int bus,
611 unsigned int devfn);
612#endif /* CONFIG_PCI_LEGACY */ 610#endif /* CONFIG_PCI_LEGACY */
613 611
614enum pci_lost_interrupt_reason { 612enum pci_lost_interrupt_reason {
@@ -647,6 +645,7 @@ int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn,
647 int where, u16 val); 645 int where, u16 val);
648int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, 646int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn,
649 int where, u32 val); 647 int where, u32 val);
648struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops);
650 649
651static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) 650static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val)
652{ 651{
@@ -711,8 +710,8 @@ int pcix_get_mmrbc(struct pci_dev *dev);
711int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); 710int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc);
712int pcie_get_readrq(struct pci_dev *dev); 711int pcie_get_readrq(struct pci_dev *dev);
713int pcie_set_readrq(struct pci_dev *dev, int rq); 712int pcie_set_readrq(struct pci_dev *dev, int rq);
713int __pci_reset_function(struct pci_dev *dev);
714int pci_reset_function(struct pci_dev *dev); 714int pci_reset_function(struct pci_dev *dev);
715int pci_execute_reset_function(struct pci_dev *dev);
716void pci_update_resource(struct pci_dev *dev, int resno); 715void pci_update_resource(struct pci_dev *dev, int resno);
717int __must_check pci_assign_resource(struct pci_dev *dev, int i); 716int __must_check pci_assign_resource(struct pci_dev *dev, int i);
718int pci_select_bars(struct pci_dev *dev, unsigned long flags); 717int pci_select_bars(struct pci_dev *dev, unsigned long flags);
@@ -732,7 +731,7 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
732pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); 731pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
733bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); 732bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
734void pci_pme_active(struct pci_dev *dev, bool enable); 733void pci_pme_active(struct pci_dev *dev, bool enable);
735int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); 734int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable);
736int pci_wake_from_d3(struct pci_dev *dev, bool enable); 735int pci_wake_from_d3(struct pci_dev *dev, bool enable);
737pci_power_t pci_target_state(struct pci_dev *dev); 736pci_power_t pci_target_state(struct pci_dev *dev);
738int pci_prepare_to_sleep(struct pci_dev *dev); 737int pci_prepare_to_sleep(struct pci_dev *dev);
@@ -798,7 +797,7 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids,
798int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, 797int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
799 int pass); 798 int pass);
800 799
801void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), 800void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *),
802 void *userdata); 801 void *userdata);
803int pci_cfg_space_size_ext(struct pci_dev *dev); 802int pci_cfg_space_size_ext(struct pci_dev *dev);
804int pci_cfg_space_size(struct pci_dev *dev); 803int pci_cfg_space_size(struct pci_dev *dev);
@@ -888,6 +887,17 @@ static inline int pcie_aspm_enabled(void)
888extern int pcie_aspm_enabled(void); 887extern int pcie_aspm_enabled(void);
889#endif 888#endif
890 889
890#ifndef CONFIG_PCIE_ECRC
891static inline void pcie_set_ecrc_checking(struct pci_dev *dev)
892{
893 return;
894}
895static inline void pcie_ecrc_get_policy(char *str) {};
896#else
897extern void pcie_set_ecrc_checking(struct pci_dev *dev);
898extern void pcie_ecrc_get_policy(char *str);
899#endif
900
891#define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) 901#define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1)
892 902
893#ifdef CONFIG_HT_IRQ 903#ifdef CONFIG_HT_IRQ
@@ -944,12 +954,6 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor,
944 return NULL; 954 return NULL;
945} 955}
946 956
947static inline struct pci_dev *pci_find_slot(unsigned int bus,
948 unsigned int devfn)
949{
950 return NULL;
951}
952
953static inline struct pci_dev *pci_get_device(unsigned int vendor, 957static inline struct pci_dev *pci_get_device(unsigned int vendor,
954 unsigned int device, 958 unsigned int device,
955 struct pci_dev *from) 959 struct pci_dev *from)
@@ -1105,6 +1109,10 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
1105 1109
1106#include <asm/pci.h> 1110#include <asm/pci.h>
1107 1111
1112#ifndef PCIBIOS_MAX_MEM_32
1113#define PCIBIOS_MAX_MEM_32 (-1)
1114#endif
1115
1108/* these helpers provide future and backwards compatibility 1116/* these helpers provide future and backwards compatibility
1109 * for accessing popular PCI BAR info */ 1117 * for accessing popular PCI BAR info */
1110#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) 1118#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
@@ -1261,5 +1269,10 @@ static inline irqreturn_t pci_sriov_migration(struct pci_dev *dev)
1261} 1269}
1262#endif 1270#endif
1263 1271
1272#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
1273extern void pci_hp_create_module_link(struct pci_slot *pci_slot);
1274extern void pci_hp_remove_module_link(struct pci_slot *pci_slot);
1275#endif
1276
1264#endif /* __KERNEL__ */ 1277#endif /* __KERNEL__ */
1265#endif /* LINUX_PCI_H */ 1278#endif /* LINUX_PCI_H */