pcie-mediatek slot calculation correct?
Ilpo Järvinen
ilpo.jarvinen at linux.intel.com
Mon Apr 29 03:22:50 PDT 2024
Hi all,
I was doing Conf Type 0/1 helper generalization when I ran into this code
in drivers/pci/controller/pcie-mediatek.c:
u32 func = PCI_FUNC(port->slot);
u32 slot = PCI_SLOT(port->slot << 3);
With that code, function is effectively duplicated into slot, is this
correct behavior?
...Adjustments made in the history of this code fragment didn't exactly
inspire confidence on the correctness of this code. :-/
--
i.
More information about the Linux-mediatek
mailing list