[PATCH] PCI Hotplug: Rewrite acpiphp detect_used_resource
There are two unrelated problems in acpiphp that are fixed by this patch. First, acpiphp can be a module, so it is unsafe to probe the BARs of each device while it initialises -- the device may be active at the time. Second, it does not know about PCI-PCI bridge registers and so it reads garbage for the last 4 registers of the PCI-PCI bridge card and doesn't take into account the ranges that are forwarded by the bridge. This patch avoids all that by using the struct resources embedded in the pci_dev. Note that we no longer need to recurse as all the devices on the other side of a PCI-PCI bridge have their resources entirely contained within the PCI-PCI bridge's ranges.
Showing
Please register or sign in to comment