aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/probe.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 7c8ca351beae..4170113cde61 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -775,7 +775,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
775 /* Check if setup is sensible at all */ 775 /* Check if setup is sensible at all */
776 if (!pass && 776 if (!pass &&
777 (primary != bus->number || secondary <= bus->number || 777 (primary != bus->number || secondary <= bus->number ||
778 secondary > subordinate || subordinate > bus->busn_res.end)) { 778 secondary > subordinate)) {
779 dev_info(&dev->dev, "bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n", 779 dev_info(&dev->dev, "bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n",
780 secondary, subordinate); 780 secondary, subordinate);
781 broken = 1; 781 broken = 1;
@@ -849,8 +849,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
849 child = pci_add_new_bus(bus, dev, max+1); 849 child = pci_add_new_bus(bus, dev, max+1);
850 if (!child) 850 if (!child)
851 goto out; 851 goto out;
852 pci_bus_insert_busn_res(child, max+1, 852 pci_bus_insert_busn_res(child, max+1, 0xff);
853 bus->busn_res.end);
854 } 853 }
855 max++; 854 max++;
856 buses = (buses & 0xff000000) 855 buses = (buses & 0xff000000)
@@ -909,11 +908,6 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
909 /* 908 /*
910 * Set the subordinate bus number to its real value. 909 * Set the subordinate bus number to its real value.
911 */ 910 */
912 if (max > bus->busn_res.end) {
913 dev_warn(&dev->dev, "max busn %02x is outside %pR\n",
914 max, &bus->busn_res);
915 max = bus->busn_res.end;
916 }
917 pci_bus_update_busn_res_end(child, max); 911 pci_bus_update_busn_res_end(child, max);
918 pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max); 912 pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max);
919 } 913 }