diff options
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r-- | drivers/pci/setup-bus.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 19b111383f62..66cb8f4cc5f4 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -874,19 +874,16 @@ void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge) | |||
874 | again: | 874 | again: |
875 | pci_bus_size_bridges(parent); | 875 | pci_bus_size_bridges(parent); |
876 | __pci_bridge_assign_resources(bridge, &head); | 876 | __pci_bridge_assign_resources(bridge, &head); |
877 | retval = pci_reenable_device(bridge); | ||
878 | pci_set_master(bridge); | ||
879 | pci_enable_bridges(parent); | ||
880 | 877 | ||
881 | tried_times++; | 878 | tried_times++; |
882 | 879 | ||
883 | if (!head.next) | 880 | if (!head.next) |
884 | return; | 881 | goto enable_all; |
885 | 882 | ||
886 | if (tried_times >= 2) { | 883 | if (tried_times >= 2) { |
887 | /* still fail, don't need to try more */ | 884 | /* still fail, don't need to try more */ |
888 | free_failed_list(&head); | 885 | free_failed_list(&head); |
889 | return; | 886 | goto enable_all; |
890 | } | 887 | } |
891 | 888 | ||
892 | printk(KERN_DEBUG "PCI: No. %d try to assign unassigned res\n", | 889 | printk(KERN_DEBUG "PCI: No. %d try to assign unassigned res\n", |
@@ -919,5 +916,10 @@ again: | |||
919 | free_failed_list(&head); | 916 | free_failed_list(&head); |
920 | 917 | ||
921 | goto again; | 918 | goto again; |
919 | |||
920 | enable_all: | ||
921 | retval = pci_reenable_device(bridge); | ||
922 | pci_set_master(bridge); | ||
923 | pci_enable_bridges(parent); | ||
922 | } | 924 | } |
923 | EXPORT_SYMBOL_GPL(pci_assign_unassigned_bridge_resources); | 925 | EXPORT_SYMBOL_GPL(pci_assign_unassigned_bridge_resources); |