[PATCH v2 07/10] PCI/LUO: Add liveupdate to pcieport driver

Chris Li
2025-09-16T07:45:20Z

The PCIe port driver is the driver bound to the PCI-PCI bridge.
The PCIe port device is depended on by its PCI children devices.

Add the empty liveupdate callback to the pcieport driver to indicate
this driver supports liveupdate. Otherwise it can fail the liveupdate
operation if the PCI-PCI bridge is depended..

Signed-off-by: Chris Li <chrisl@kernel.org>
---
drivers/pci/pcie/portdrv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
index 0e9ef387182856771d857181d88f376632b46f0d..fd43c1ebfb9d2852fbc460b0390dd7fb016226d2 100644
--- a/drivers/pci/pcie/portdrv.c
+++ b/drivers/pci/pcie/portdrv.c
@@ -789,6 +789,15 @@ static const struct pci_error_handlers pcie_portdrv_err_handler = {
.mmio_enabled = pcie_portdrv_mmio_enabled,
};

+#ifdef CONFIG_LIVEUPDATE
+
+/*
+ * Empty pcie_port_lu_ops to indicate this driver support liveupdate.
+ */
+static struct dev_liveupdate_ops pcie_port_lu_ops;
+
+#endif /* CONFIG_LIVEUPDATE */
+
static struct pci_driver pcie_portdriver = {
.name = "pcieport",
.id_table = port_pci_ids,
@@ -802,6 +811,9 @@ static struct pci_driver pcie_portdriver = {
.driver_managed_dma = true,

.driver.pm = PCIE_PORTDRV_PM_OPS,
+#ifdef CONFIG_LIVEUPDATE
+ .driver.lu = &pcie_port_lu_ops,
+#endif
};

static int __init dmi_pcie_pme_disable_msi(const struct dmi_system_id *d)

--
2.51.0.384.g4c02a37b29-goog