--- zzzz-none-000/linux-4.9.276/arch/mips/pci/pci-legacy.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/arch/mips/pci/pci-legacy.c 2023-04-05 08:19:00.000000000 +0000 @@ -77,7 +77,7 @@ static int next_busno; static int need_domain_info; LIST_HEAD(resources); - struct pci_bus *bus; + struct pci_bus *bus, *child; if (hose->get_busno && pci_has_flag(PCI_PROBE_ONLY)) next_busno = (*hose->get_busno)(); @@ -88,8 +88,14 @@ hose->io_resource, hose->io_offset); pci_add_resource_offset(&resources, hose->busn_resource, hose->busn_offset); - bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose, - &resources); + + if (IS_ENABLED(CONFIG_PCI_MSI)) { + bus = pci_scan_root_bus_msi(NULL, next_busno, + hose->pci_ops, hose, &resources, + hose->msi_ctr); + } else + bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose, + &resources); hose->bus = bus; need_domain_info = need_domain_info || pci_domain_nr(bus); @@ -199,7 +205,7 @@ } INIT_LIST_HEAD(&hose->list); - list_add(&hose->list, &controllers); + list_add_tail(&hose->list, &controllers); /* * Do not panic here but later - this might happen before console init.