diff options
| author | Maximilian Brune <[email protected]> | 2026-04-22 14:57:53 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-04-27 11:11:08 -0600 |
| commit | 6ab5b5d2804b00d3253d09c6d8f829d918d2ed1c (patch) | |
| tree | 4b5e1b5096803a774889a0cb0483a0f02907c392 /scripts/Makefile.lib | |
| parent | d7b23b2477ee6e966b0f9b8ae304b0bf9df58297 (diff) | |
pci: correct PCI device enumeration to include all functions on device 0
Currently the implementation does not just skip all devices beside
device 0, it also skips all functions (besides 0) on device 0. This
broke basically all AMD platforms, since they have a lot of internal SOC
devices behind these functions.
This was detected, because the XHCI controller and therefore the USB
devices were not found by u-boot on AMD/crater platform.
PCI_MASK_BUS() returns both device and function bits, so it skips any
bdf where either device > 0 or function > 0. Using PCI_DEV() extracts
only the device number, matching the intent in only_one_child().
It therefore now checks all functions on device 0 (Linux does the same).
I build tested u-boot as coreboot payload and run it on a recent x86 AMD
platform. Devices like the XHCI controller are now found again.
Fixes: fbde868ba4aa ("pci: skip unnecessary PCIe scanning")
Signed-off-by: Maximilian Brune <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
CC: Tom Rini <[email protected]>
CC: Andrew Goodbody <[email protected]>
CC: George McCollister <[email protected]>
CC: Simon Glass <[email protected]>
Diffstat (limited to 'scripts/Makefile.lib')
0 files changed, 0 insertions, 0 deletions
