From patchwork Wed Sep 9 23:36:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 46503 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n89NiRs8022018 for ; Wed, 9 Sep 2009 23:44:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754568AbZIIXni (ORCPT ); Wed, 9 Sep 2009 19:43:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754690AbZIIXna (ORCPT ); Wed, 9 Sep 2009 19:43:30 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:35989 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754541AbZIIXl4 (ORCPT ); Wed, 9 Sep 2009 19:41:56 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 1BEFC1571CE; Wed, 9 Sep 2009 22:38:22 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01613-04; Wed, 9 Sep 2009 22:37:44 +0200 (CEST) Received: from tosh.localnet (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 1508E1571DC; Wed, 9 Sep 2009 22:37:44 +0200 (CEST) From: "Rafael J. Wysocki" To: "linux-pm" Subject: [PATCH 4/9] PM: Allow PCI devices to suspend/resume asynchronously Date: Thu, 10 Sep 2009 01:36:56 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.31-rc9-rjw; KDE/4.3.1; x86_64; ; ) Cc: LKML , Linux PCI , ACPI Devel Maling List , Len Brown , Zhang Rui , Pavel Machek , Alan Stern , Arjan van de Ven , Ingo Molnar References: <200909100127.11252.rjw@sisk.pl> In-Reply-To: <200909100127.11252.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <200909100136.56111.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/pci/pci.c =================================================================== --- linux-2.6.orig/drivers/pci/pci.c +++ linux-2.6/drivers/pci/pci.c @@ -1373,6 +1373,7 @@ void pci_pm_init(struct pci_dev *dev) int pm; u16 pmc; + device_enable_async_suspend(&dev->dev, true); dev->wakeup_prepared = false; dev->pm_cap = 0; 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); } /**