[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250728-luo-pci-v1-17-955b078dd653@kernel.org>
Date: Mon, 28 Jul 2025 01:24:47 -0700
From: chrisl@...nel.org
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, Danilo Krummrich <dakr@...nel.org>,
Len Brown <lenb@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
linux-acpi@...r.kernel.org, David Matlack <dmatlack@...gle.com>,
Pasha Tatashin <tatashin@...gle.com>, Jason Miu <jasonmiu@...gle.com>,
Vipin Sharma <vipinsh@...gle.com>, Saeed Mahameed <saeedm@...dia.com>,
Adithya Jayachandran <ajayachandra@...dia.com>,
Parav Pandit <parav@...dia.com>, William Tu <witu@...dia.com>,
Mike Rapoport <rppt@...nel.org>, Chris Li <chrisl@...nel.org>,
Jason Gunthorpe <jgg@...pe.ca>, Leon Romanovsky <leon@...nel.org>
Subject: [PATCH RFC 17/25] PCI/LUO: Restore the no_d3cold flag
From: Jason Miu <jasonmiu@...gle.com>
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@...nel.org>
---
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
Powered by blists - more mailing lists