[PATCH RFC 17/25] PCI/LUO: Restore the no_d3cold flag

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

 



From: Jason Miu <jasonmiu@xxxxxxxxxx>

When the PCI bus adds a device, restore the saved no_d3cold flag
before the bus does the D3 checking for the bridge. This tells the
bridge the current D3cold availability of the device.

Tested: QEMU VM boot test.

Signed-off-by: Chris Li <chrisl@xxxxxxxxxx>
---
 drivers/pci/bus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 69048869ef1c378454f86091ddb2b59a3c3d53ec..e9c7a6dc643d3534755e4ef5218fb6f90d5dcd65 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -353,6 +353,11 @@ void pci_bus_add_device(struct pci_dev *dev)
 		of_pci_make_dev_node(dev);
 	pci_create_sysfs_dev_files(dev);
 	pci_proc_attach_device(dev);
+	/*
+	 * Restore the no_d3cold flag for the device before we start to update
+	 * the D3 state for the bridge.
+	 */
+	dev->no_d3cold = PCI_SER_GET(dev, no_d3cold, dev->no_d3cold);
 	pci_bridge_d3_update(dev);
 
 	/*

-- 
2.50.1.487.gc89ff58d15-goog





[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