aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 8e952fdab764..b5dad9f37453 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -720,12 +720,6 @@ static int acpiphp_bus_add(struct acpiphp_func *func)
720 -ret_val); 720 -ret_val);
721 goto acpiphp_bus_add_out; 721 goto acpiphp_bus_add_out;
722 } 722 }
723 /*
724 * try to start anyway. We could have failed to add
725 * simply because this bus had previously been added
726 * on another add. Don't bother with the return value
727 * we just keep going.
728 */
729 ret_val = acpi_bus_start(device); 723 ret_val = acpi_bus_start(device);
730 724
731acpiphp_bus_add_out: 725acpiphp_bus_add_out:
@@ -755,6 +749,24 @@ static int acpiphp_bus_trim(acpi_handle handle)
755 return retval; 749 return retval;
756} 750}
757 751
752static 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
758/** 770/**
759 * enable_device - enable, configure a slot 771 * enable_device - enable, configure a slot
760 * @slot: slot to be enabled 772 * @slot: slot to be enabled
@@ -811,6 +823,7 @@ static int __ref enable_device(struct acpiphp_slot *slot)
811 pci_bus_assign_resources(bus); 823 pci_bus_assign_resources(bus);
812 acpiphp_sanitize_bus(bus); 824 acpiphp_sanitize_bus(bus);
813 acpiphp_set_hpp_values(bus); 825 acpiphp_set_hpp_values(bus);
826 acpiphp_set_acpi_region(slot);
814 pci_enable_bridges(bus); 827 pci_enable_bridges(bus);
815 pci_bus_add_devices(bus); 828 pci_bus_add_devices(bus);
816 829