From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: [PATCH 4/6] PM: Allow PCI devices to suspend/resume asynchronously Date: Wed, 26 Aug 2009 22:22:31 +0200 Message-ID: <200908262222.31789.rjw@sisk.pl> References: <200908262217.19609.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200908262217.19609.rjw@sisk.pl> Sender: linux-pci-owner@vger.kernel.org To: linux-pm Cc: LKML , Len Brown , Pavel Machek , Alan Stern , ACPI Devel Maling List , Arjan van de Ven , Zhang Rui , Dmitry Torokhov , Linux PCI List-Id: linux-acpi@vger.kernel.org From: Rafael J. Wysocki Set async_suspend for all PCI devices and PCIe port services, so that they can be suspended and resumed asynchronously with other devices they don't depend on in a known way (i.e. devices which are not their parents or children and to which they are not connected via struct pm_link objects). Signed-off-by: Rafael J. Wysocki --- drivers/pci/pci.c | 1 + drivers/pci/pcie/portdrv_core.c | 1 + 2 files changed, 2 insertions(+) Index: linux-2.6/drivers/pci/pci.c =================================================================== --- linux-2.6.orig/drivers/pci/pci.c +++ linux-2.6/drivers/pci/pci.c @@ -1360,6 +1360,7 @@ void pci_pm_init(struct pci_dev *dev) int pm; u16 pmc; + device_enable_async_suspend(&dev->dev, true); dev->pm_cap = 0; /* find PCI PM capability in list */ Index: linux-2.6/drivers/pci/pcie/portdrv_core.c =================================================================== --- linux-2.6.orig/drivers/pci/pcie/portdrv_core.c +++ linux-2.6/drivers/pci/pcie/portdrv_core.c @@ -280,6 +280,7 @@ static void pcie_device_init(struct pci_ dev_set_name(device, "%s:pcie%02x", pci_name(parent), get_descriptor_id(port_type, service_type)); device->parent = &parent->dev; + device_enable_async_suspend(device, true); } /**