]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: Pass bridge window to pci_bus_release_bridge_resources()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 29 Aug 2025 13:11:12 +0000 (16:11 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 16 Sep 2025 16:20:06 +0000 (11:20 -0500)
commit159fbfd0412b0351a512d716757b6eac4639da84
tree5baf3a3ad38c5579848ce93599502fca16cfd420
parentebbebd8873c4bab4f3553b22f43388de6349f1ee
PCI: Pass bridge window to pci_bus_release_bridge_resources()

pci_bus_release_bridge_resources() takes type, which is converted into a
bridge window resource in pci_bridge_release_resources().

Find out the correct bridge window for resource whose assignment failed.
Pass that bridge window to pci_bus_release_bridge_resources() instead of
passing the type. When recursing to subordinate, check which bridge windows
have to be released and recurse for each.

For now, use pbus_select_window_for_type() instead of pbus_select_window()
because non-bridge window resources still have their flags reset which
destroys the type information from the struct resource. The struct
pci_dev_resource holds a copy of the flags which are used instead.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250829131113.36754-24-ilpo.jarvinen@linux.intel.com
drivers/pci/setup-bus.c