On Mon, Feb 02, 2026 at 10:14:57AM +0100, Jan Beulich wrote:
> On 29.01.2026 14:08, Jan Beulich wrote:
> > @@ -1042,6 +1053,79 @@ enum pdev_type pdev_type(u16 seg, u8 bus
> > return pos ? DEV_TYPE_PCIe_ENDPOINT : DEV_TYPE_PCI;
> > }
> >
> > +void pci_check_extcfg(struct pci_dev *pdev)
> > +{
> > + unsigned int pos;
> > +
> > + pdev->ext_cfg = false;
> > +
> > + switch ( pdev->type )
> > + {
> > + case DEV_TYPE_PCIe_ENDPOINT:
> > + case DEV_TYPE_PCIe_BRIDGE:
> > + case DEV_TYPE_PCI_HOST_BRIDGE:
> > + case DEV_TYPE_PCIe2PCI_BRIDGE:
> > + case DEV_TYPE_PCI2PCIe_BRIDGE:
> > + break;
> > +
> > + case DEV_TYPE_LEGACY_PCI_BRIDGE:
> > + case DEV_TYPE_PCI:
> > + pos = pci_find_cap_offset(pdev->sbdf, PCI_CAP_ID_PCIX);
> > + if ( !pos ||
> > + !(pci_conf_read32(pdev->sbdf, pos + PCI_X_STATUS) &
> > + (PCI_X_STATUS_266MHZ | PCI_X_STATUS_533MHZ)) )
>
> To not violate Misra rule 7.2 I'll fold in the change below. I guess I'll
> further follow up with a patch adjusting other problematic #define-s in
> that header, too.
I'm fine if you want to do a pre-patch fixing all the problematic
defines in the header and put it ahead of the series. Maybe it makes
more sense to fix them all in a single commit than fixing one here and
the rest separately?
Thanks, Roger.