Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1257265
| From | Yinghai Lu <yinghai@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v8 23/61] PCI: Don't release sibling bridge resources during hotplug |
| Date | 2015-10-27 22:20 +0100 |
| Message-ID | <qojOY-1Qn-65@gated-at.bofh.it> (permalink) |
| References | <qojvA-1tZ-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On hotplug path, we can not touch sibling bridges that is outside
of the slot.
That could happen when BIOS does not assign some bridge BARs and
later kernel can not assign resource to them in first try.
Check if fail dev is the parent bridge, then just use subordinate
bus instead use parent bus.
Reported-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/setup-bus.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 278cb6d..10270e4 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1858,10 +1858,16 @@ again:
* Try to release leaf bridge's resources that doesn't fit resource of
* child device under that bridge
*/
- list_for_each_entry(fail_res, &fail_head, list)
- pci_bus_release_bridge_resources(fail_res->dev->bus,
+ list_for_each_entry(fail_res, &fail_head, list) {
+ struct pci_bus *bus = fail_res->dev->bus;
+
+ if (fail_res->dev == bridge)
+ bus = bridge->subordinate;
+
+ pci_bus_release_bridge_resources(bus,
fail_res->flags & type_mask,
whole_subtree);
+ }
/* restore size and flags */
list_for_each_entry(fail_res, &fail_head, list) {
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v8 00/61] PCI: Resource allocation cleanup for v4.4 Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 26/61] PCI: Use correct align for optional only resources during sorting Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 30/61] PCI: Reorder resources list for required/optional resources Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 15/61] PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64 Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 33/61] PCI: Treat ROM resource as optional during realloc Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 07/61] PCI: Kill wrong quirk about M7101 Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 08/61] PCI: Ignore BAR for ALi M1533 PCI-ISA bridge Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 05/61] sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 29/61] PCI: Don't add too much optional size for hotplug bridge MMIO Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 23/61] PCI: Don't release sibling bridge resources during hotplug Yinghai Lu <yinghai@kernel.org> - 2015-10-27 22:20 +0100 [PATCH v8 50/61] PCI: Unify calculate_size() for io port and MMIO Yinghai Lu <yinghai@kernel.org> - 2015-10-27 23:00 +0100 [PATCH v8 32/61] PCI: Rename pdev_sort_resources() to pdev_assign_resources_prepare() Yinghai Lu <yinghai@kernel.org> - 2015-10-27 23:00 +0100 [PATCH v8 53/61] PCI: Kill macro checking for bus io port sizing Yinghai Lu <yinghai@kernel.org> - 2015-10-27 23:00 +0100 Re: [PATCH v8 00/61] PCI: Resource allocation cleanup for v4.4 Yinghai Lu <yinghai@kernel.org> - 2015-10-31 03:00 +0100
csiph-web