Closed
Description
In the latest PR Support to limit scanning entire PCIe space, the check for bus is buried down in the function area, causing lots of wasted prints and time:
/* Iterate over all buses, devices and functions in this ecam */
for (bus_index = start_bus; bus_index <= end_bus; bus_index++)
{
for (dev_index = 0; dev_index < PCIE_MAX_DEV; dev_index++)
{
for (func_index = 0; func_index < PCIE_MAX_FUNC; func_index++)
{
if (pal_pcie_check_bus_valid(bus_index)) {
val_print(ACS_PRINT_DEBUG,
" Bus 0x%x marked as invalid in Platform API...Skipping\n", bus_index);
continue;
}
It needs to be moved up to the bus portion of the big for loop:
/* Iterate over all buses, devices and functions in this ecam */
for (bus_index = start_bus; bus_index <= end_bus; bus_index++)
{
if (pal_pcie_check_bus_valid(bus_index)) {
val_print(ACS_PRINT_DEBUG,
" Bus 0x%x marked as invalid in Platform API...Skipping\n", bus_index);
continue;
} for (dev_index = 0; dev_index < PCIE_MAX_DEV; dev_index++)
{
for (func_index = 0; func_index < PCIE_MAX_FUNC; func_index++)
{
Metadata
Metadata
Assignees
Labels
No labels