Reported by Mika Westerberg <firstname.lastname@example.org> at https://email@example.com :
When hot-adding a PCIe switch the way we currently distribute resources
does not always work well because devices connected to the switch might
need to have their MMIO resources aligned to something else than the
default 1 MB boundary. For example Intel Gigabit ET2 quad port server
adapter includes PCIe switch leading to 4 x GbE NIC devices that want
to have their MMIO resources aligned to 2 MB boundary instead.
The current resource distribution code does not take this alignment into
account and might try to add too much resources for the extension
hotplug bridge(s). The resulting bridge window is too big which makes
the resource assignment operation fail, and we are left with a bridge
window with minimal amount (1 MB) of MMIO space.
Here is what happens when an Intel Gigabit ET2 quad port server adapter
pci 0000:39:00.0: BAR 14: assigned [mem 0x53300000-0x6a0fffff]
pci 0000:3a:01.0: BAR 14: assigned [mem 0x53400000-0x547fffff]
The above shows that the downstream bridge (3a:01.0) window is aligned
to 2 MB instead of 1 MB as is the upstream bridge (39:00.0) window. The
remaining MMIO space (0x15a00000) is assigned to the hotplug bridge
(3a:04.0) but it fails:
pci 0000:3a:04.0: BAR 14: no space for [mem size 0x15a00000]
pci 0000:3a:04.0: BAR 14: failed to assign [mem size 0x15a00000]
Created attachment 275697 [details]
Created attachment 275699 [details]
dmesg (showing problem)
Created attachment 275701 [details]
dmesg (with proposed patch)
Created attachment 275703 [details]
lspci (before proposed patch)
Created attachment 275705 [details]
lspci (with proposed patch)
Head's up for anybody interested. This bug is in process of being solved with this patch: https://lkml.org/lkml/2019/2/1/391
Mika Westerberg tested the exact same setup with the patch and it worked fine.
I added this bug URL to the latest revision of the patch that I just emailed a few minutes ago.
I have issue since this patch, i need to add pci=nommconf in boot config, for more information :
@Benoit, which patch is causing the issue? As far as I know, none of these have been applied to the kernel. Mika Westerberg's proposed patches do not solve the issue (not enough information conveyed in function parameters to be possible) and mine has never been accepted into mainline.
I had a brief read of the links you sent and did not find the answer. None of these patches relate to ACPI, which appears to be the issue in the links.
If you are not daisy chaining Thunderbolt devices with native enumeration, then the bug on this page and the proposed patches have no effect. They only matter when hot-adding Thunderbolt devices with >1M alignment at the end of a daisy chain. Adding the device straight to the Thunderbolt 3 port of the computer works regardless.