On Thu, 12 Nov 2026 at 13:01, Oscar Alejandro Sánchez Lucero
<[email protected]> wrote:
>
> Replace the deprecated device_class_set_legacy_reset() in pci_bridge_dev.c
> with the three-phase ResettableClass interface, chaining the hold phase
> to the parent class.
>
> Signed-off-by: Oscar Alejandro Sánchez Lucero <[email protected]>
> @@ -253,7 +266,8 @@ static void pci_bridge_dev_class_init(ObjectClass *klass,
> const void *data)
> k->device_id = PCI_DEVICE_ID_REDHAT_BRIDGE;
> k->class_id = PCI_CLASS_BRIDGE_PCI;
> dc->desc = "Standard PCI Bridge";
> - device_class_set_legacy_reset(dc, qdev_pci_bridge_dev_reset);
> + resettable_class_set_parent_phases(rc, NULL, pci_bridge_dev_reset_hold,
> + NULL, &bdc->parent_phases);
> device_class_set_props(dc, pci_bridge_dev_properties);
> dc->vmsd = &pci_bridge_dev_vmstate;
> set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
> @@ -266,6 +280,7 @@ static const TypeInfo pci_bridge_dev_info = {
> .name = TYPE_PCI_BRIDGE_DEV,
> .parent = TYPE_PCI_BRIDGE,
> .instance_size = sizeof(PCIBridgeDev),
> + .class_size = sizeof(PCIBridgeDevClass),
> .class_init = pci_bridge_dev_class_init,
> .instance_finalize = pci_bridge_dev_instance_finalize,
> .interfaces = (const InterfaceInfo[]) {
TYPE_PCI_BRIDGE (and its parent TYPE_PCI_DEVICE) don't implement
a reset method. Usually we don't bother setting up the infrastructure
in the child class to chain to the parent class reset unless there
actually is a parent class reset to chain to.
thanks
-- PMM