Commit 69643e4829c5cd13bafe44a6b9f3eb2086e0f618

Authored by Ian Campbell
Committed by Jesse Barnes
1 parent e522a7126c

PCI hotplug: acpiphp: assume device is in state D0 after powering on 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>

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

drivers/pci/hotplug/acpiphp_glue.c
... ... @@ -827,6 +827,13 @@
827 827 acpiphp_set_hpp_values(bus);
828 828 acpiphp_set_acpi_region(slot);
829 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 +
830 837 pci_bus_add_devices(bus);
831 838  
832 839 list_for_each_entry(func, &slot->funcs, sibling) {