[RFC PATCH 2/3] PCI: parallel resume for pci devices on bus 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



device parallel resume support for PCI devices

Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>
---
 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;
 


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux