aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorAndreas Noever <andreas.noever@gmail.com>2014-01-23 15:59:26 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-02-11 17:16:09 -0500
commitf5fb40700fc9a52944fbe07148c858a5025908b1 (patch)
treeb89595290e15b9cf93ef140520685e054986bf5f /drivers/pci
parent1820ffdccb9b4398c5f0f70360edc68e039c3c72 (diff)
PCI: Remove pci_fixup_parent_subordinate_busnr()
The function has no effect. If pcibios_assign_all_busses() is not set then the function does nothing. If it is set then in pci_scan_bridge we are always in the branch where we assign the bus numbers ourselves and the subordinate values of all parent busses will be set to 0xff since that is what they inherited from their parent bus and ultimately from the root bus. Signed-off-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/probe.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 9a641cc4275d..e5df03669470 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -731,22 +731,6 @@ struct pci_bus *__ref pci_add_new_bus(struct pci_bus *parent, struct pci_dev *de
731 return child; 731 return child;
732} 732}
733 733
734static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)
735{
736 struct pci_bus *parent = child->parent;
737
738 /* Attempts to fix that up are really dangerous unless
739 we're going to re-assign all bus numbers. */
740 if (!pcibios_assign_all_busses())
741 return;
742
743 while (parent->parent && parent->busn_res.end < max) {
744 parent->busn_res.end = max;
745 pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max);
746 parent = parent->parent;
747 }
748}
749
750/* 734/*
751 * If it's a bridge, configure it and scan the bus behind it. 735 * If it's a bridge, configure it and scan the bus behind it.
752 * For CardBus bridges, we don't scan behind as the devices will 736 * For CardBus bridges, we don't scan behind as the devices will
@@ -879,20 +863,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
879 863
880 if (!is_cardbus) { 864 if (!is_cardbus) {
881 child->bridge_ctl = bctl; 865 child->bridge_ctl = bctl;
882 /*
883 * Adjust subordinate busnr in parent buses.
884 * We do this before scanning for children because
885 * some devices may not be detected if the bios
886 * was lazy.
887 */
888 pci_fixup_parent_subordinate_busnr(child, max);
889 /* Now we can scan all subordinate buses... */
890 max = pci_scan_child_bus(child); 866 max = pci_scan_child_bus(child);
891 /*
892 * now fix it up again since we have found
893 * the real value of max.
894 */
895 pci_fixup_parent_subordinate_busnr(child, max);
896 } else { 867 } else {
897 /* 868 /*
898 * For CardBus bridges, we leave 4 bus numbers 869 * For CardBus bridges, we leave 4 bus numbers
@@ -923,7 +894,6 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
923 } 894 }
924 } 895 }
925 max += i; 896 max += i;
926 pci_fixup_parent_subordinate_busnr(child, max);
927 } 897 }
928 /* 898 /*
929 * Set the subordinate bus number to its real value. 899 * Set the subordinate bus number to its real value.