|
@@ -775,7 +775,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
|
|
|
/* Check if setup is sensible at all */
|
|
|
if (!pass &&
|
|
|
(primary != bus->number || secondary <= bus->number ||
|
|
|
- secondary > subordinate || subordinate > bus->busn_res.end)) {
|
|
|
+ secondary > subordinate)) {
|
|
|
dev_info(&dev->dev, "bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n",
|
|
|
secondary, subordinate);
|
|
|
broken = 1;
|
|
@@ -849,8 +849,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
|
|
|
child = pci_add_new_bus(bus, dev, max+1);
|
|
|
if (!child)
|
|
|
goto out;
|
|
|
- pci_bus_insert_busn_res(child, max+1,
|
|
|
- bus->busn_res.end);
|
|
|
+ pci_bus_insert_busn_res(child, max+1, 0xff);
|
|
|
}
|
|
|
max++;
|
|
|
buses = (buses & 0xff000000)
|
|
@@ -909,11 +908,6 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
|
|
|
/*
|
|
|
* Set the subordinate bus number to its real value.
|
|
|
*/
|
|
|
- if (max > bus->busn_res.end) {
|
|
|
- dev_warn(&dev->dev, "max busn %02x is outside %pR\n",
|
|
|
- max, &bus->busn_res);
|
|
|
- max = bus->busn_res.end;
|
|
|
- }
|
|
|
pci_bus_update_busn_res_end(child, max);
|
|
|
pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max);
|
|
|
}
|