Re: [PATCH v18 11/13] PCI: Cache PCI DSN into pci_dev->dsn during probe
Lukas Wunner <[email protected]>
| Newsgroups | org.kernel.vger.linux-cxl,org.kernel.vger.linux-acpi,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 17, 2026 at 05:27:04PM -0500, Terry Bowman wrote: > Add a u64 dsn field to struct pci_dev and populate it from pci_get_dsn() > during pci_init_capabilities() at probe time via pci_dsn_init(). Only > write dev->dsn when the read succeeds. The zero initial value from > pci_dev allocation already represents 'no DSN available.' The DSN is already cached on (natively handled) PCIe hotplug ports to detect device replacement during system sleep, see struct controller in drivers/pci/hotplug/pciehp.h. Please remove that member from struct controller, remove the two assignments to the member in pciehp_configure_device() and pcie_init() and change the comparison in pciehp_device_replaced() to use the new member in struct pci_dev. You can do this either as part of this patch or in a separate patch. Thanks, Lukas