[SRU][N][PATCH 0/1] Compile error due to nonexistent struct member with CONFIG_PCI_EPF_TEST
Noah Wager
noah.wager at canonical.com
Thu Apr 2 02:55:52 UTC 2026
BugLink: https://bugs.launchpad.net/bugs/2147065
[ Impact ]
The noble 6.8 kernel fails to build when CONFIG_PCI_EPF_TEST is enabled, with
the following error:
```
CC [M] drivers/pci/endpoint/functions/pci-epf-test.o
drivers/pci/endpoint/functions/pci-epf-test.c: In function 'pci_epf_test_alloc_space':
drivers/pci/endpoint/functions/pci-epf-test.c:863:33: error: 'const struct pci_epc_features' has no member named 'bar'
863 | if (epc_features->bar[bar].type == BAR_FIXED)
| ^~
drivers/pci/endpoint/functions/pci-epf-test.c:863:52: error: 'BAR_FIXED' undeclared (first use in this function)
863 | if (epc_features->bar[bar].type == BAR_FIXED)
| ^~~~~~~~~
drivers/pci/endpoint/functions/pci-epf-test.c:863:52: note: each undeclared identifier is reported only once for each function it appears in
drivers/pci/endpoint/functions/pci-epf-test.c:864:53: error: 'const struct pci_epc_features' has no member named 'bar'
864 | test_reg_size = epc_features->bar[bar].fixed_size;
| ^~
make[8]: *** [scripts/Makefile.build:243: drivers/pci/endpoint/functions/pci-epf-test.o] Error 1
make[7]: *** [scripts/Makefile.build:481: drivers/pci/endpoint/functions] Error 2
make[6]: *** [scripts/Makefile.build:481: drivers/pci/endpoint] Error 2
```
This is due to the inclusion of the linux-6.12.y upstream stable commit:
e741dabcc52b ("PCI: endpoint: pci-epf-test: Limit PCIe BAR size for fixed BARs")
without including the dependent (non-stable) commit:
e01c9797c0eb ("PCI: endpoint: Clean up hardware description for BARs")
The 6.12 commit does not fix any issues that have been observed with the 6.8
noble kernel, so it should be reverted. After doing so, the kernel compiles
when the config is enabled.
[ Test Plan ]
1. Apply the revert.
2. Enable CONFIG_PCI_EPF_TEST in the generic 6.8 kernel
3. Compile the kernel.
The compilation should succeed with the revert.
[ Where problems could occur ]
Since this config is disabled in Ubuntu by default, it has not been tested in
the past. Even though it compiles with this fix, that does not guarantee
correct behaviour in the features that the config enables. For example,
reverting this commit means the feature will definitely not work with
controllers with too-small fixed BAR sizes, as that is what the commit fixes
upstream. If it is needed, a full backport of the commit and its dependents will
be necessary.
[ Other Info ]
For context, this issue was found because the noble:linux-nvidia-tegra kernel
needs to enable PCI_EPF_TEST, so more issues may be found once that gets further
testing.
Noah Wager (1):
UBUNTU: SAUCE: Revert "PCI: endpoint: pci-epf-test: Limit PCIe BAR
size for fixed BARs"
drivers/pci/endpoint/functions/pci-epf-test.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--
2.43.0
More information about the kernel-team
mailing list