@@ -2069,15 +2069,23 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
struct pci_host_bridge_window *window;
bool found = false;
struct pci_bus *b;
+ LIST_HEAD(default_res);
int max;
- list_for_each_entry(window, resources, list)
- if (window->res->flags & IORESOURCE_BUS) {
- found = true;
- break;
- }
+ if (!resources) {
+ pci_add_resource(&default_res, &ioport_resource);
+ pci_add_resource(&default_res, &iomem_resource);
+ pci_add_resource(&default_res, &busn_resource);
+ } else {
+ list_for_each_entry(window, resources, list)
+ if (window->res->flags & IORESOURCE_BUS) {
+ found = true;
+ break;
+ }
+ }
- b = pci_create_root_bus(parent, bus, ops, sysdata, resources);
+ b = pci_create_root_bus(parent, bus, ops, sysdata,
+ resources ? resources : &default_res);
if (!b)
return NULL;