diff options
-rw-r--r-- | drivers/pci/setup-bus.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index bf32f07c4efb..4fe36d2e1049 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -101,9 +101,17 @@ static void __assign_resources_sorted(struct resource_list *head, | |||
101 | for (list = head->next; list;) { | 101 | for (list = head->next; list;) { |
102 | res = list->res; | 102 | res = list->res; |
103 | idx = res - &list->dev->resource[0]; | 103 | idx = res - &list->dev->resource[0]; |
104 | |||
104 | if (pci_assign_resource(list->dev, idx)) { | 105 | if (pci_assign_resource(list->dev, idx)) { |
105 | if (fail_head && !pci_is_root_bus(list->dev->bus)) | 106 | if (fail_head && !pci_is_root_bus(list->dev->bus)) { |
106 | add_to_failed_list(fail_head, list->dev, res); | 107 | /* |
108 | * if the failed res is for ROM BAR, and it will | ||
109 | * be enabled later, don't add it to the list | ||
110 | */ | ||
111 | if (!((idx == PCI_ROM_RESOURCE) && | ||
112 | (!(res->flags & IORESOURCE_ROM_ENABLE)))) | ||
113 | add_to_failed_list(fail_head, list->dev, res); | ||
114 | } | ||
107 | res->start = 0; | 115 | res->start = 0; |
108 | res->end = 0; | 116 | res->end = 0; |
109 | res->flags = 0; | 117 | res->flags = 0; |