arm/PCI: convert to pci_scan_root_bus() for correct root bus resources
Convert from pci_scan_bus() to pci_scan_root_bus() and remove root bus resource fixups. This fixes the problem of "early" and "header" quirks seeing incorrect root bus resources. CC: Russell King <linux@arm.linux.org.uk> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:

committed by
Jesse Barnes

parent
a2f33da11a
commit
37d15909ff
@@ -316,21 +316,6 @@ pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
|
||||
}
|
||||
}
|
||||
|
||||
static void __devinit
|
||||
pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
|
||||
{
|
||||
struct pci_dev *dev = bus->self;
|
||||
int i;
|
||||
|
||||
if (!dev) {
|
||||
/*
|
||||
* Assign root bus resources.
|
||||
*/
|
||||
for (i = 0; i < 3; i++)
|
||||
bus->resource[i] = root->resource[i];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* pcibios_fixup_bus - Called after each bus is probed,
|
||||
* but before its children are examined.
|
||||
@@ -341,8 +326,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
|
||||
struct pci_dev *dev;
|
||||
u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK;
|
||||
|
||||
pbus_assign_bus_resources(bus, root);
|
||||
|
||||
/*
|
||||
* Walk the devices on this bus, working out what we can
|
||||
* and can't support.
|
||||
@@ -508,12 +491,18 @@ static void __init pcibios_init_hw(struct hw_pci *hw)
|
||||
sys->busnr = busnr;
|
||||
sys->swizzle = hw->swizzle;
|
||||
sys->map_irq = hw->map_irq;
|
||||
sys->resource[0] = &ioport_resource;
|
||||
sys->resource[1] = &iomem_resource;
|
||||
INIT_LIST_HEAD(&sys->resources);
|
||||
|
||||
ret = hw->setup(nr, sys);
|
||||
|
||||
if (ret > 0) {
|
||||
if (list_empty(&sys->resources)) {
|
||||
pci_add_resource(&sys->resources,
|
||||
&ioport_resource);
|
||||
pci_add_resource(&sys->resources,
|
||||
&iomem_resource);
|
||||
}
|
||||
|
||||
sys->bus = hw->scan(nr, sys);
|
||||
|
||||
if (!sys->bus)
|
||||
|
Reference in New Issue
Block a user