public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 2/3] PCI: parallel resume for pci devices on bus 0
@ 2008-12-19  6:34 Zhang Rui
  2008-12-19  6:49 ` Matthew Wilcox
  2008-12-19 15:09 ` [linux-pm] " Alan Stern
  0 siblings, 2 replies; 16+ messages in thread
From: Zhang Rui @ 2008-12-19  6:34 UTC (permalink / raw)
  To: linux-pm, linux-acpi, linux-pci
  Cc: Rafael J. Wysocki, Len Brown, Barnes, Jesse, Zhang, Rui

device parallel resume support for PCI devices

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
 drivers/pci/bus.c    |    4 ++++
 drivers/pci/remove.c |    2 ++
 2 files changed, 6 insertions(+)

Index: linux-2.6/drivers/pci/bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/bus.c
+++ linux-2.6/drivers/pci/bus.c
@@ -85,6 +85,10 @@ int pci_bus_add_device(struct pci_dev *d
 		return retval;
 
 	dev->is_added = 1;
+
+	/* parallel resume for pci devices on bus 0 */
+	if (dev->bus->number == 0)
+		device_parallel_resume_register(&dev->dev, 1);
 	pci_proc_attach_device(dev);
 	pci_create_sysfs_dev_files(dev);
 	return 0;
Index: linux-2.6/drivers/pci/remove.c
===================================================================
--- linux-2.6.orig/drivers/pci/remove.c
+++ linux-2.6/drivers/pci/remove.c
@@ -92,6 +92,8 @@ EXPORT_SYMBOL(pci_remove_bus);
  */
 void pci_remove_bus_device(struct pci_dev *dev)
 {
+	if (dev->bus->number == 0 && dev->dev.resumed)
+		device_parallel_resume_unregister(&dev->dev);
 	if (dev->subordinate) {
 		struct pci_bus *b = dev->subordinate;
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-01-19  0:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-19  6:34 [RFC PATCH 2/3] PCI: parallel resume for pci devices on bus 0 Zhang Rui
2008-12-19  6:49 ` Matthew Wilcox
2008-12-19 15:09 ` [linux-pm] " Alan Stern
2008-12-19 19:21   ` Len Brown
2008-12-22  2:56   ` Zhang Rui
2008-12-22 15:52     ` Alan Stern
2008-12-24  2:36       ` Zhang Rui
2008-12-24  2:47         ` Alan Stern
2009-01-16  6:24           ` Zhao Yakui
2009-01-16 15:10             ` Alan Stern
2009-01-17  7:31               ` Zhao Yakui
2009-01-17 17:15                 ` Alan Stern
2009-01-19  1:10                   ` Zhao Yakui
2009-01-16  6:24           ` Zhao Yakui
2009-01-16  1:55       ` Zhao Yakui
2009-01-16 15:05         ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox