Skip to content

Commit 336b5be

Browse files
dhdangbjorn-helgaas
authored andcommitted
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>
1 parent 32f638f commit 336b5be

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/pci/host/pci-xgene.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,15 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
631631
if (ret)
632632
return ret;
633633

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);
635636
if (!bus)
636637
return -ENOMEM;
637638

639+
pci_scan_child_bus(bus);
640+
pci_assign_unassigned_bus_resources(bus);
641+
pci_bus_add_devices(bus);
642+
638643
platform_set_drvdata(pdev, port);
639644
return 0;
640645
}

0 commit comments

Comments
 (0)