--- zzzz-none-000/linux-4.9.231/arch/mips/pci/pci-legacy.c 2020-07-22 07:10:54.000000000 +0000 +++ falcon-5530-730/linux-4.9.231/arch/mips/pci/pci-legacy.c 2022-08-31 08:19:48.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); @@ -194,7 +200,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.