For platforms with a limited iATU inbound window entries, pci_epc_set_bar() might fail to allocate the ATU entries for subrange maps requiring more than 1 slot. For the dwc controller, this failure is reported with -ENOSPC in dw_pcie_ep_set_bar(). In this case, the epf test cannot be run and needs to be skipped.
For other controllers (Rockchip, RCar, Cadence) the .set_bar functions do not use this error. Signed-off-by: Christian Bruel <[email protected]> --- Christian Bruel (3): selftests: pci_endpoint: Skip subrange map test if iATU allocation fails PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange map test misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case drivers/misc/pci_endpoint_test.c | 6 +++++- drivers/pci/endpoint/functions/pci-epf-test.c | 3 +++ tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) --- base-commit: 8e5a478b6d6a5bb0a3d52147862b15e4d826af19 change-id: 20260318-skip-bar_subrange-tests-if-enospc-c26f03038e92 Best regards, -- Christian Bruel <[email protected]>

