hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/pci/hotplug/acpiphp_glue.c
....@@ -5,7 +5,7 @@
55 * Copyright (C) 2002,2003 Takayoshi Kochi (t-kochi@bq.jp.nec.com)
66 * Copyright (C) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
77 * Copyright (C) 2002,2003 NEC Corporation
8
- * Copyright (C) 2003-2005 Matthew Wilcox (matthew.wilcox@hp.com)
8
+ * Copyright (C) 2003-2005 Matthew Wilcox (willy@infradead.org)
99 * Copyright (C) 2003-2005 Hewlett Packard
1010 * Copyright (C) 2005 Rajesh Shah (rajesh.shah@intel.com)
1111 * Copyright (C) 2005 Intel Corporation
....@@ -393,19 +393,12 @@
393393 static void acpiphp_set_acpi_region(struct acpiphp_slot *slot)
394394 {
395395 struct acpiphp_func *func;
396
- union acpi_object params[2];
397
- struct acpi_object_list arg_list;
398396
399397 list_for_each_entry(func, &slot->funcs, sibling) {
400
- arg_list.count = 2;
401
- arg_list.pointer = params;
402
- params[0].type = ACPI_TYPE_INTEGER;
403
- params[0].integer.value = ACPI_ADR_SPACE_PCI_CONFIG;
404
- params[1].type = ACPI_TYPE_INTEGER;
405
- params[1].integer.value = 1;
406398 /* _REG is optional, we don't care about if there is failure */
407
- acpi_evaluate_object(func_to_handle(func), "_REG", &arg_list,
408
- NULL);
399
+ acpi_evaluate_reg(func_to_handle(func),
400
+ ACPI_ADR_SPACE_PCI_CONFIG,
401
+ ACPI_REG_CONNECT);
409402 }
410403 }
411404
....@@ -510,12 +503,15 @@
510503 if (pass && dev->subordinate) {
511504 check_hotplug_bridge(slot, dev);
512505 pcibios_resource_survey_bus(dev->subordinate);
513
- __pci_bus_size_bridges(dev->subordinate,
514
- &add_list);
506
+ if (pci_is_root_bus(bus))
507
+ __pci_bus_size_bridges(dev->subordinate, &add_list);
515508 }
516509 }
517510 }
518
- __pci_bus_assign_resources(bus, &add_list, NULL);
511
+ if (pci_is_root_bus(bus))
512
+ __pci_bus_assign_resources(bus, &add_list, NULL);
513
+ else
514
+ pci_assign_unassigned_bridge_resources(bus->self);
519515 }
520516
521517 acpiphp_sanitize_bus(bus);