|
@@ -485,7 +485,7 @@ void pci_read_bridge_bases(struct pci_bus *child)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static struct pci_bus *pci_alloc_bus(void)
|
|
|
|
|
|
|
+static struct pci_bus *pci_alloc_bus(struct pci_bus *parent)
|
|
|
{
|
|
{
|
|
|
struct pci_bus *b;
|
|
struct pci_bus *b;
|
|
|
|
|
|
|
@@ -500,6 +500,10 @@ static struct pci_bus *pci_alloc_bus(void)
|
|
|
INIT_LIST_HEAD(&b->resources);
|
|
INIT_LIST_HEAD(&b->resources);
|
|
|
b->max_bus_speed = PCI_SPEED_UNKNOWN;
|
|
b->max_bus_speed = PCI_SPEED_UNKNOWN;
|
|
|
b->cur_bus_speed = PCI_SPEED_UNKNOWN;
|
|
b->cur_bus_speed = PCI_SPEED_UNKNOWN;
|
|
|
|
|
+#ifdef CONFIG_PCI_DOMAINS_GENERIC
|
|
|
|
|
+ if (parent)
|
|
|
|
|
+ b->domain_nr = parent->domain_nr;
|
|
|
|
|
+#endif
|
|
|
return b;
|
|
return b;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -671,7 +675,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
|
|
|
/*
|
|
/*
|
|
|
* Allocate a new bus, and inherit stuff from the parent..
|
|
* Allocate a new bus, and inherit stuff from the parent..
|
|
|
*/
|
|
*/
|
|
|
- child = pci_alloc_bus();
|
|
|
|
|
|
|
+ child = pci_alloc_bus(parent);
|
|
|
if (!child)
|
|
if (!child)
|
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
|
@@ -1761,13 +1765,14 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
|
|
|
char bus_addr[64];
|
|
char bus_addr[64];
|
|
|
char *fmt;
|
|
char *fmt;
|
|
|
|
|
|
|
|
- b = pci_alloc_bus();
|
|
|
|
|
|
|
+ b = pci_alloc_bus(NULL);
|
|
|
if (!b)
|
|
if (!b)
|
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
|
|
b->sysdata = sysdata;
|
|
b->sysdata = sysdata;
|
|
|
b->ops = ops;
|
|
b->ops = ops;
|
|
|
b->number = b->busn_res.start = bus;
|
|
b->number = b->busn_res.start = bus;
|
|
|
|
|
+ pci_bus_assign_domain_nr(b, parent);
|
|
|
b2 = pci_find_bus(pci_domain_nr(b), bus);
|
|
b2 = pci_find_bus(pci_domain_nr(b), bus);
|
|
|
if (b2) {
|
|
if (b2) {
|
|
|
/* If we already got to this bus through a different bridge, ignore it */
|
|
/* If we already got to this bus through a different bridge, ignore it */
|