Hi Janusz,
[...]
> +static bool is_pcie_upstream_bridge(struct pci_dev *dev)
> +{
> + struct pci_cap *pcie;
> + uint8_t type;
> +
> + type = pci_read_byte(dev, PCI_HEADER_TYPE) & 0x7f;
0x7f is a magic value here. It took some time to find out why
you apply that mask here, so it might be good to add a short
comment that this is supposed to remove multi-function device
property from the whole value.
Rest of the code looks good to me:
Reviewed-by: Krzysztof Karas <[email protected]>
--
Best Regards,
Krzysztof