ARM/PCI: Set MPS before pci_bus_add_devices()
The MPS configuration should be done *before* pci_bus_add_devices(). After pci_bus_add_devices(), drivers may be bound to devices, and the PCI core shouldn't touch device configuration while a driver owns the device. [bhelgaas: remove check for bus being non-NULL] Reported-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
bc0195aad0
commit
808b27a5ae
1 changed files with 6 additions and 14 deletions
|
@ -521,6 +521,8 @@ void pci_common_init_dev(struct device *parent, struct hw_pci *hw)
|
||||||
struct pci_bus *bus = sys->bus;
|
struct pci_bus *bus = sys->bus;
|
||||||
|
|
||||||
if (!pci_has_flag(PCI_PROBE_ONLY)) {
|
if (!pci_has_flag(PCI_PROBE_ONLY)) {
|
||||||
|
struct pci_bus *child;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Size the bridge windows.
|
* Size the bridge windows.
|
||||||
*/
|
*/
|
||||||
|
@ -530,24 +532,14 @@ void pci_common_init_dev(struct device *parent, struct hw_pci *hw)
|
||||||
* Assign resources.
|
* Assign resources.
|
||||||
*/
|
*/
|
||||||
pci_bus_assign_resources(bus);
|
pci_bus_assign_resources(bus);
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Tell drivers about devices found.
|
|
||||||
*/
|
|
||||||
pci_bus_add_devices(bus);
|
|
||||||
}
|
|
||||||
|
|
||||||
list_for_each_entry(sys, &head, node) {
|
|
||||||
struct pci_bus *bus = sys->bus;
|
|
||||||
|
|
||||||
/* Configure PCI Express settings */
|
|
||||||
if (bus && !pci_has_flag(PCI_PROBE_ONLY)) {
|
|
||||||
struct pci_bus *child;
|
|
||||||
|
|
||||||
list_for_each_entry(child, &bus->children, node)
|
list_for_each_entry(child, &bus->children, node)
|
||||||
pcie_bus_configure_settings(child);
|
pcie_bus_configure_settings(child);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Tell drivers about devices found.
|
||||||
|
*/
|
||||||
|
pci_bus_add_devices(bus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue