Public bug reported:

[ 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.

** Affects: linux-nvidia-tegra (Ubuntu)
     Importance: Undecided
     Assignee: Noah Wager (nwager)
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2147065

Title:
  Compile error due to nonexistent struct member with
  CONFIG_PCI_EPF_TEST

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-tegra/+bug/2147065/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to