diff options
author | Duc Dang <dhdang@apm.com> | 2014-11-06 20:14:18 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-11-13 11:53:30 -0500 |
commit | 336b5be2c56f3cf2252f5a39d344ef67cf9bdf7a (patch) | |
tree | 8b0dfc4bd5d4a5009fa9ae04629ba6e0a71a1879 | |
parent | 32f638fc11db0526c706454d9ab4339d55ac89f3 (diff) |
PCI: xgene: Assign resources to bus before adding new devices
The X-Gene PCIe driver assumes pci_scan_root_bus() assigns resources as
proposed in [1]. But we dropped patch [1] because it would break some
architectures, which means the X-Gene PCIe driver is currently broken.
Add calls to scan the bus, assign resources, and add devices in the X-Gene
driver to fix this.
[bhelgaas: changelog]
[1] http://lkml.kernel.org/r/1412000971-9242-11-git-send-email-Liviu.Dudau@arm.com
Signed-off-by: Duc Dang <dhdang@apm.com>
Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/pci/host/pci-xgene.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index 9ecabfa8c634..2988fe136c1e 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c | |||
@@ -631,10 +631,15 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev) | |||
631 | if (ret) | 631 | if (ret) |
632 | return ret; | 632 | return ret; |
633 | 633 | ||
634 | bus = pci_scan_root_bus(&pdev->dev, 0, &xgene_pcie_ops, port, &res); | 634 | bus = pci_create_root_bus(&pdev->dev, 0, |
635 | &xgene_pcie_ops, port, &res); | ||
635 | if (!bus) | 636 | if (!bus) |
636 | return -ENOMEM; | 637 | return -ENOMEM; |
637 | 638 | ||
639 | pci_scan_child_bus(bus); | ||
640 | pci_assign_unassigned_bus_resources(bus); | ||
641 | pci_bus_add_devices(bus); | ||
642 | |||
638 | platform_set_drvdata(pdev, port); | 643 | platform_set_drvdata(pdev, port); |
639 | return 0; | 644 | return 0; |
640 | } | 645 | } |