diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-02-08 19:16:33 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2010-02-26 20:39:12 +0100 |
commit | a1e4d72cd3024999bfb6703092ea271438805c89 (patch) | |
tree | 853a289d73ad9ffb04038fc493d209e980a3ef9b | |
parent | 09c09bc618a4ceec387c57542031b4fc35826e16 (diff) | |
download | kernel_goldelico_gta04-a1e4d72cd3024999bfb6703092ea271438805c89.zip kernel_goldelico_gta04-a1e4d72cd3024999bfb6703092ea271438805c89.tar.gz kernel_goldelico_gta04-a1e4d72cd3024999bfb6703092ea271438805c89.tar.bz2 |
PM: Allow PCI devices to suspend/resume asynchronously
Set power.async_suspend for all PCI devices and PCIe port services,
so that they can be suspended and resumed in parallel with other
devices they don't depend on in a known way (i.e. devices which are
not their parents or children).
This only affects the "regular" suspend and resume stages, which
means in particular that the restoration of the PCI devices' standard
configuration registers during resume will still be carried out
synchronously (at the "early" resume stage).
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r-- | drivers/pci/pci.c | 1 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 1 | ||||
-rw-r--r-- | drivers/pci/probe.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index f4a2738..2b9ac9e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1540,6 +1540,7 @@ void pci_pm_init(struct pci_dev *dev) int pm; u16 pmc; + device_enable_async_suspend(&dev->dev); dev->wakeup_prepared = false; dev->pm_cap = 0; diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 0d34ff4..e73effb 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -285,6 +285,7 @@ static int pcie_device_init(struct pci_dev *pdev, int service, int irq) pci_name(pdev), get_descriptor_id(pdev->pcie_type, service)); device->parent = &pdev->dev; + device_enable_async_suspend(device); retval = device_register(device); if (retval) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 270d069..2a94309 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1436,6 +1436,7 @@ struct pci_bus * pci_create_bus(struct device *parent, if (error) goto dev_reg_err; b->bridge = get_device(dev); + device_enable_async_suspend(b->bridge); if (!parent) set_dev_node(b->bridge, pcibus_to_node(b)); |