Commit a1e4d72cd3024999bfb6703092ea271438805c89

Authored by Rafael J. Wysocki
1 parent 09c09bc618

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>

Showing 3 changed files with 3 additions and 0 deletions Side-by-side Diff

... ... @@ -1540,6 +1540,7 @@
1540 1540 int pm;
1541 1541 u16 pmc;
1542 1542  
  1543 + device_enable_async_suspend(&dev->dev);
1543 1544 dev->wakeup_prepared = false;
1544 1545 dev->pm_cap = 0;
1545 1546  
drivers/pci/pcie/portdrv_core.c
... ... @@ -285,6 +285,7 @@
285 285 pci_name(pdev),
286 286 get_descriptor_id(pdev->pcie_type, service));
287 287 device->parent = &pdev->dev;
  288 + device_enable_async_suspend(device);
288 289  
289 290 retval = device_register(device);
290 291 if (retval)
... ... @@ -1436,6 +1436,7 @@
1436 1436 if (error)
1437 1437 goto dev_reg_err;
1438 1438 b->bridge = get_device(dev);
  1439 + device_enable_async_suspend(b->bridge);
1439 1440  
1440 1441 if (!parent)
1441 1442 set_dev_node(b->bridge, pcibus_to_node(b));