Skip to content

Commit

Permalink
PCI hotplug: acpiphp: assume device is in state D0 after powering on …
Browse files Browse the repository at this point in the history
…a slot.

Devices which do not support PCI configuration space based power
management may not otherwise be enabled.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Ian Campbell authored and Jesse Barnes committed May 11, 2011
1 parent e522a71 commit 69643e4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,13 @@ static int __ref enable_device(struct acpiphp_slot *slot)
acpiphp_set_hpp_values(bus);
acpiphp_set_acpi_region(slot);
pci_enable_bridges(bus);

list_for_each_entry(dev, &bus->devices, bus_list) {
/* Assume that newly added devices are powered on already. */
if (!dev->is_added)
dev->current_state = PCI_D0;
}

pci_bus_add_devices(bus);

list_for_each_entry(func, &slot->funcs, sibling) {
Expand Down

0 comments on commit 69643e4

Please sign in to comment.