diff options
| -rw-r--r-- | drivers/pci/pci.c | 11 | ||||
| -rw-r--r-- | include/linux/pci.h | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index acc4b6ef78c4..c44393f26fd3 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -4324,6 +4324,17 @@ bool pci_device_is_present(struct pci_dev *pdev) | |||
| 4324 | } | 4324 | } |
| 4325 | EXPORT_SYMBOL_GPL(pci_device_is_present); | 4325 | EXPORT_SYMBOL_GPL(pci_device_is_present); |
| 4326 | 4326 | ||
| 4327 | void pci_ignore_hotplug(struct pci_dev *dev) | ||
| 4328 | { | ||
| 4329 | struct pci_dev *bridge = dev->bus->self; | ||
| 4330 | |||
| 4331 | dev->ignore_hotplug = 1; | ||
| 4332 | /* Propagate the "ignore hotplug" setting to the parent bridge. */ | ||
| 4333 | if (bridge) | ||
| 4334 | bridge->ignore_hotplug = 1; | ||
| 4335 | } | ||
| 4336 | EXPORT_SYMBOL_GPL(pci_ignore_hotplug); | ||
| 4337 | |||
| 4327 | #define RESOURCE_ALIGNMENT_PARAM_SIZE COMMAND_LINE_SIZE | 4338 | #define RESOURCE_ALIGNMENT_PARAM_SIZE COMMAND_LINE_SIZE |
| 4328 | static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE] = {0}; | 4339 | static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE] = {0}; |
| 4329 | static DEFINE_SPINLOCK(resource_alignment_lock); | 4340 | static DEFINE_SPINLOCK(resource_alignment_lock); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 353db8dc4c6e..ef45ffe9ca88 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1006,6 +1006,7 @@ int __must_check pci_assign_resource(struct pci_dev *dev, int i); | |||
| 1006 | int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align); | 1006 | int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align); |
| 1007 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | 1007 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); |
| 1008 | bool pci_device_is_present(struct pci_dev *pdev); | 1008 | bool pci_device_is_present(struct pci_dev *pdev); |
| 1009 | void pci_ignore_hotplug(struct pci_dev *dev); | ||
| 1009 | 1010 | ||
| 1010 | /* ROM control related routines */ | 1011 | /* ROM control related routines */ |
| 1011 | int pci_enable_rom(struct pci_dev *pdev); | 1012 | int pci_enable_rom(struct pci_dev *pdev); |
| @@ -1043,11 +1044,6 @@ bool pci_dev_run_wake(struct pci_dev *dev); | |||
| 1043 | bool pci_check_pme_status(struct pci_dev *dev); | 1044 | bool pci_check_pme_status(struct pci_dev *dev); |
| 1044 | void pci_pme_wakeup_bus(struct pci_bus *bus); | 1045 | void pci_pme_wakeup_bus(struct pci_bus *bus); |
| 1045 | 1046 | ||
| 1046 | static inline void pci_ignore_hotplug(struct pci_dev *dev) | ||
| 1047 | { | ||
| 1048 | dev->ignore_hotplug = 1; | ||
| 1049 | } | ||
| 1050 | |||
| 1051 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, | 1047 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, |
| 1052 | bool enable) | 1048 | bool enable) |
| 1053 | { | 1049 | { |
