aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/setup-bus.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 2991a8975064..162edfb356b6 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1292,7 +1292,6 @@ pci_assign_unassigned_resources(void)
1292 struct pci_dev_resource *fail_res; 1292 struct pci_dev_resource *fail_res;
1293 unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM | 1293 unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM |
1294 IORESOURCE_PREFETCH; 1294 IORESOURCE_PREFETCH;
1295 unsigned long failed_type;
1296 int pci_try_num = 1; 1295 int pci_try_num = 1;
1297 1296
1298 /* don't realloc if asked to do so */ 1297 /* don't realloc if asked to do so */
@@ -1327,16 +1326,7 @@ again:
1327 if (list_empty(&fail_head)) 1326 if (list_empty(&fail_head))
1328 goto enable_and_dump; 1327 goto enable_and_dump;
1329 1328
1330 failed_type = 0; 1329 if (tried_times >= pci_try_num) {
1331 list_for_each_entry(fail_res, &fail_head, list)
1332 failed_type |= fail_res->flags;
1333
1334 /*
1335 * io port are tight, don't try extra
1336 * or if reach the limit, don't want to try more
1337 */
1338 failed_type &= type_mask;
1339 if ((failed_type == IORESOURCE_IO) || (tried_times >= pci_try_num)) {
1340 free_list(&fail_head); 1330 free_list(&fail_head);
1341 goto enable_and_dump; 1331 goto enable_and_dump;
1342 } 1332 }