diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 19 | ||||
-rw-r--r-- | drivers/pci/pci.c | 33 |
2 files changed, 21 insertions, 31 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index cb2fd01eddae..b5dad9f37453 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -749,6 +749,24 @@ static int acpiphp_bus_trim(acpi_handle handle) | |||
749 | return retval; | 749 | return retval; |
750 | } | 750 | } |
751 | 751 | ||
752 | static void acpiphp_set_acpi_region(struct acpiphp_slot *slot) | ||
753 | { | ||
754 | struct acpiphp_func *func; | ||
755 | union acpi_object params[2]; | ||
756 | struct acpi_object_list arg_list; | ||
757 | |||
758 | list_for_each_entry(func, &slot->funcs, sibling) { | ||
759 | arg_list.count = 2; | ||
760 | arg_list.pointer = params; | ||
761 | params[0].type = ACPI_TYPE_INTEGER; | ||
762 | params[0].integer.value = ACPI_ADR_SPACE_PCI_CONFIG; | ||
763 | params[1].type = ACPI_TYPE_INTEGER; | ||
764 | params[1].integer.value = 1; | ||
765 | /* _REG is optional, we don't care about if there is failure */ | ||
766 | acpi_evaluate_object(func->handle, "_REG", &arg_list, NULL); | ||
767 | } | ||
768 | } | ||
769 | |||
752 | /** | 770 | /** |
753 | * enable_device - enable, configure a slot | 771 | * enable_device - enable, configure a slot |
754 | * @slot: slot to be enabled | 772 | * @slot: slot to be enabled |
@@ -805,6 +823,7 @@ static int __ref enable_device(struct acpiphp_slot *slot) | |||
805 | pci_bus_assign_resources(bus); | 823 | pci_bus_assign_resources(bus); |
806 | acpiphp_sanitize_bus(bus); | 824 | acpiphp_sanitize_bus(bus); |
807 | acpiphp_set_hpp_values(bus); | 825 | acpiphp_set_hpp_values(bus); |
826 | acpiphp_set_acpi_region(slot); | ||
808 | pci_enable_bridges(bus); | 827 | pci_enable_bridges(bus); |
809 | pci_bus_add_devices(bus); | 828 | pci_bus_add_devices(bus); |
810 | 829 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 897fa5ccdb78..cb1dd5f4988c 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1583,8 +1583,10 @@ void pci_pm_init(struct pci_dev *dev) | |||
1583 | int pm; | 1583 | int pm; |
1584 | u16 pmc; | 1584 | u16 pmc; |
1585 | 1585 | ||
1586 | pm_runtime_forbid(&dev->dev); | ||
1586 | device_enable_async_suspend(&dev->dev); | 1587 | device_enable_async_suspend(&dev->dev); |
1587 | dev->wakeup_prepared = false; | 1588 | dev->wakeup_prepared = false; |
1589 | |||
1588 | dev->pm_cap = 0; | 1590 | dev->pm_cap = 0; |
1589 | 1591 | ||
1590 | /* find PCI PM capability in list */ | 1592 | /* find PCI PM capability in list */ |
@@ -2296,35 +2298,6 @@ void pci_msi_off(struct pci_dev *dev) | |||
2296 | } | 2298 | } |
2297 | } | 2299 | } |
2298 | 2300 | ||
2299 | #ifndef HAVE_ARCH_PCI_SET_DMA_MASK | ||
2300 | /* | ||
2301 | * These can be overridden by arch-specific implementations | ||
2302 | */ | ||
2303 | int | ||
2304 | pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
2305 | { | ||
2306 | if (!pci_dma_supported(dev, mask)) | ||
2307 | return -EIO; | ||
2308 | |||
2309 | dev->dma_mask = mask; | ||
2310 | dev_dbg(&dev->dev, "using %dbit DMA mask\n", fls64(mask)); | ||
2311 | |||
2312 | return 0; | ||
2313 | } | ||
2314 | |||
2315 | int | ||
2316 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
2317 | { | ||
2318 | if (!pci_dma_supported(dev, mask)) | ||
2319 | return -EIO; | ||
2320 | |||
2321 | dev->dev.coherent_dma_mask = mask; | ||
2322 | dev_dbg(&dev->dev, "using %dbit consistent DMA mask\n", fls64(mask)); | ||
2323 | |||
2324 | return 0; | ||
2325 | } | ||
2326 | #endif | ||
2327 | |||
2328 | #ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE | 2301 | #ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE |
2329 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size) | 2302 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size) |
2330 | { | 2303 | { |
@@ -3066,8 +3039,6 @@ EXPORT_SYMBOL(pci_set_mwi); | |||
3066 | EXPORT_SYMBOL(pci_try_set_mwi); | 3039 | EXPORT_SYMBOL(pci_try_set_mwi); |
3067 | EXPORT_SYMBOL(pci_clear_mwi); | 3040 | EXPORT_SYMBOL(pci_clear_mwi); |
3068 | EXPORT_SYMBOL_GPL(pci_intx); | 3041 | EXPORT_SYMBOL_GPL(pci_intx); |
3069 | EXPORT_SYMBOL(pci_set_dma_mask); | ||
3070 | EXPORT_SYMBOL(pci_set_consistent_dma_mask); | ||
3071 | EXPORT_SYMBOL(pci_assign_resource); | 3042 | EXPORT_SYMBOL(pci_assign_resource); |
3072 | EXPORT_SYMBOL(pci_find_parent_resource); | 3043 | EXPORT_SYMBOL(pci_find_parent_resource); |
3073 | EXPORT_SYMBOL(pci_select_bars); | 3044 | EXPORT_SYMBOL(pci_select_bars); |