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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index cb23aa2ebf96..a70fa89f76fd 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -212,6 +212,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
212 212
213 pdev = pci_get_slot(pbus, PCI_DEVFN(device, function)); 213 pdev = pci_get_slot(pbus, PCI_DEVFN(device, function));
214 if (pdev) { 214 if (pdev) {
215 pdev->current_state = PCI_D0;
215 slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON); 216 slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON);
216 pci_dev_put(pdev); 217 pci_dev_put(pdev);
217 } 218 }
@@ -584,7 +585,7 @@ static void remove_bridge(acpi_handle handle)
584 585
585 /* 586 /*
586 * On root bridges with hotplug slots directly underneath (ie, 587 * On root bridges with hotplug slots directly underneath (ie,
587 * no p2p bridge inbetween), we call cleanup_bridge(). 588 * no p2p bridge between), we call cleanup_bridge().
588 * 589 *
589 * The else clause cleans up root bridges that either had no 590 * The else clause cleans up root bridges that either had no
590 * hotplug slots at all, or had a p2p bridge underneath. 591 * hotplug slots at all, or had a p2p bridge underneath.
@@ -826,6 +827,13 @@ static int __ref enable_device(struct acpiphp_slot *slot)
826 acpiphp_set_hpp_values(bus); 827 acpiphp_set_hpp_values(bus);
827 acpiphp_set_acpi_region(slot); 828 acpiphp_set_acpi_region(slot);
828 pci_enable_bridges(bus); 829 pci_enable_bridges(bus);
830
831 list_for_each_entry(dev, &bus->devices, bus_list) {
832 /* Assume that newly added devices are powered on already. */
833 if (!dev->is_added)
834 dev->current_state = PCI_D0;
835 }
836
829 pci_bus_add_devices(bus); 837 pci_bus_add_devices(bus);
830 838
831 list_for_each_entry(func, &slot->funcs, sibling) { 839 list_for_each_entry(func, &slot->funcs, sibling) {