From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux PCI <linux-pci@vger.kernel.org>,
pm list <linux-pm@lists.linux-foundation.org>,
linux-usb@vger.kernel.org, Greg KH <gregkh@suse.de>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
James Bottomley <James.Bottomley@suse.de>,
Linux SCSI <linux-scsi@vger.kernel.org>,
Arjan van de Ven <arjan@infradead.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Len Brown <lenb@kernel.org>,
Nigel Cunningham <ncunningham@crca.org.au>
Subject: [PATCH 6/8] PM: Allow PCI devices to suspend/resume asynchronously
Date: Sun, 24 Jan 2010 00:39:40 +0100 [thread overview]
Message-ID: <201001240039.40419.rjw@sisk.pl> (raw)
In-Reply-To: <201001240033.34253.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
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>
---
drivers/pci/pci.c | 1 +
drivers/pci/pcie/portdrv_core.c | 1 +
drivers/pci/probe.c | 1 +
3 files changed, 3 insertions(+)
Index: linux-2.6/drivers/pci/pci.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci.c
+++ linux-2.6/drivers/pci/pci.c
@@ -1541,6 +1541,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;
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
@@ -285,6 +285,7 @@ static int pcie_device_init(struct pci_d
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)
Index: linux-2.6/drivers/pci/probe.c
===================================================================
--- linux-2.6.orig/drivers/pci/probe.c
+++ linux-2.6/drivers/pci/probe.c
@@ -1200,6 +1200,7 @@ struct pci_bus * pci_create_bus(struct d
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));
next prev parent reply other threads:[~2010-01-23 23:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-23 23:33 [PATCH 0/8] PM: Asynchronous suspen and resume Rafael J. Wysocki
2010-01-23 23:34 ` [PATCH 1/8] PM: Add parent information to timing messages Rafael J. Wysocki
2010-02-25 7:01 ` Pavel Machek
2010-01-23 23:35 ` [PATCH 2/8] PM: Asynchronous suspend and resume of devices Rafael J. Wysocki
2010-01-24 16:37 ` Alan Stern
2010-01-23 23:36 ` [PATCH 3/8] PM: Add a switch for disabling/enabling asynchronous suspend/resume Rafael J. Wysocki
2010-01-23 23:38 ` [PATCH 4/8] PM: Add facility for advanced testing of async suspend/resume Rafael J. Wysocki
2010-01-23 23:38 ` [PATCH 5/8] PM: Start asynchronous resume threads upfront Rafael J. Wysocki
2010-01-23 23:39 ` Rafael J. Wysocki [this message]
2010-01-23 23:40 ` [PATCH 7/8] PM: Allow USB devices to suspend/resume asynchronously Rafael J. Wysocki
2010-01-23 23:41 ` [PATCH 8/8] PM: Allow SCSI " Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201001240039.40419.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=James.Bottomley@suse.de \
--cc=arjan@infradead.org \
--cc=gregkh@suse.de \
--cc=jbarnes@virtuousgeek.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ncunningham@crca.org.au \
--cc=stern@rowland.harvard.edu \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox