On Tue, 9 Jun 2026 16:28:29 +0530 Shrihari E S <[email protected]> wrote:
> Move the 'flitmode' property from PCIESlot to PCIEPort. This change > allows all the derived ports (PCIe ports or CXL ports) to use this > property. > > This is a structural refactor only. There is no functional change in > existing behavior. > > Note: This property was added from Davidlohr's BI patch series[1]. > > [1]: https://lore.kernel.org/all/[email protected]/ > > Signed-off-by: Shrihari E S <[email protected]> This seems fine to me other than one small thing below. Given the main changes are in PCIe code though it'll need review from appropriate maintainers. > diff --git a/hw/pci-bridge/cxl_root_port.c b/hw/pci-bridge/cxl_root_port.c > index 0ee18ef5c3..df69c5200f 100644 > --- a/hw/pci-bridge/cxl_root_port.c > +++ b/hw/pci-bridge/cxl_root_port.c > static void cxl_rp_dvsec_write_config(PCIDevice *dev, uint32_t addr, > diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c > index 1de0b1e4fd..d452199d85 100644 > --- a/hw/pci/pcie.c > +++ b/hw/pci/pcie.c > @@ -217,7 +217,7 @@ static void pcie_cap_fill_slot_lnk(PCIDevice *dev) > /* the PCI_EXP_LNKSTA_DLLLA will be set in the hotplug function */ > } > > - pcie_cap_fill_lnk(exp_cap, s->width, s->speed, s->flitmode); > + pcie_cap_fill_lnk(exp_cap, s->width, s->speed, s->parent_obj.flitmode); I think we should use a cast to the parent object type rather than going directly into s->parent_obj. PCIE_PORT(s)->flitmode. > }
