[PATCH v2 23/29] xen/PCI: use pci_create_root_bus() instead ofpci_scan_bus_parented()

From: Bjorn Helgaas
Date: Fri Oct 14 2011 - 00:29:14 EST


No functional change here; just converting from the deprecated
pci_scan_bus_parented() to pci_create_root_bus().

I don't see that Xen ever updates the root bus resources, but in
general, the default resources (ioport_resource and iomem_resource)
installed by pci_create_bus() are incorrect.

CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
---
drivers/pci/xen-pcifront.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
index 6fa215a..3a07b33 100644
--- a/drivers/pci/xen-pcifront.c
+++ b/drivers/pci/xen-pcifront.c
@@ -470,8 +470,8 @@ static int __devinit pcifront_scan_root(struct pcifront_device *pdev,
}
pcifront_init_sd(sd, domain, bus, pdev);

- b = pci_scan_bus_parented(&pdev->xdev->dev, bus,
- &pcifront_bus_ops, sd);
+ b = pci_create_root_bus(&pdev->xdev->dev, bus, &pcifront_bus_ops, sd,
+ NULL);
if (!b) {
dev_err(&pdev->xdev->dev,
"Error creating PCI Frontend Bus!\n");
@@ -479,11 +479,12 @@ static int __devinit pcifront_scan_root(struct pcifront_device *pdev,
goto err_out;
}

+ b->subordinate = pci_scan_child_bus(b);
bus_entry->bus = b;

list_add(&bus_entry->list, &pdev->root_buses);

- /* pci_scan_bus_parented skips devices which do not have a have
+ /* pci_scan_child_bus skips devices which do not have
* devfn==0. The pcifront_scan_bus enumerates all devfn. */
err = pcifront_scan_bus(pdev, domain, bus, b);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/