aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/leon_pci.c
diff options
context:
space:
mode:
authorYijing Wang <[email protected]>2015-03-09 10:33:58 +0800
committerBjorn Helgaas <[email protected]>2015-03-12 15:04:01 -0500
commitc90570d9511d42421c85709b46bffd366185d835 (patch)
tree63febf1d38c816fa7c540a8238f7436a9a483813 /arch/sparc/kernel/leon_pci.c
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
PCI: Assign resources before drivers claim devices (pci_scan_bus())
Previously, pci_scan_bus() created a root PCI bus, enumerated the devices on it, and called pci_bus_add_devices(), which made the devices available for drivers to claim them. Most callers assigned resources to devices after pci_scan_bus() returns, which may be after drivers have claimed the devices. This is incorrect; the PCI core should not change device resources while a driver is managing the device. Remove pci_bus_add_devices() from pci_scan_bus() and do it after any resource assignment in the callers. [bhelgaas: changelog, check for failure in mcf_pci_init()] Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> CC: "David S. Miller" <[email protected]> CC: Geert Uytterhoeven <[email protected]> CC: Guan Xuetao <[email protected]> CC: Richard Henderson <[email protected]> CC: Ivan Kokshaysky <[email protected]> CC: Matt Turner <[email protected]>
Diffstat (limited to 'arch/sparc/kernel/leon_pci.c')
0 files changed, 0 insertions, 0 deletions