Merge branch 'pci/host-xgene' into next
* pci/host-xgene: PCI: xgene: Configure PCIe MPS settings PCI: xgene: Fix double free on init error
This commit is contained in:
commit
9d534265bd
@ -246,14 +246,11 @@ static int xgene_pcie_ecam_init(struct pci_config_window *cfg, u32 ipversion)
|
|||||||
ret = xgene_get_csr_resource(adev, &csr);
|
ret = xgene_get_csr_resource(adev, &csr);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "can't get CSR resource\n");
|
dev_err(dev, "can't get CSR resource\n");
|
||||||
kfree(port);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
port->csr_base = devm_ioremap_resource(dev, &csr);
|
port->csr_base = devm_ioremap_resource(dev, &csr);
|
||||||
if (IS_ERR(port->csr_base)) {
|
if (IS_ERR(port->csr_base))
|
||||||
kfree(port);
|
return PTR_ERR(port->csr_base);
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
port->cfg_base = cfg->win;
|
port->cfg_base = cfg->win;
|
||||||
port->version = ipversion;
|
port->version = ipversion;
|
||||||
@ -638,7 +635,7 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
|
|||||||
struct device_node *dn = dev->of_node;
|
struct device_node *dn = dev->of_node;
|
||||||
struct xgene_pcie_port *port;
|
struct xgene_pcie_port *port;
|
||||||
resource_size_t iobase = 0;
|
resource_size_t iobase = 0;
|
||||||
struct pci_bus *bus;
|
struct pci_bus *bus, *child;
|
||||||
int ret;
|
int ret;
|
||||||
LIST_HEAD(res);
|
LIST_HEAD(res);
|
||||||
|
|
||||||
@ -681,6 +678,8 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
|
|||||||
|
|
||||||
pci_scan_child_bus(bus);
|
pci_scan_child_bus(bus);
|
||||||
pci_assign_unassigned_bus_resources(bus);
|
pci_assign_unassigned_bus_resources(bus);
|
||||||
|
list_for_each_entry(child, &bus->children, node)
|
||||||
|
pcie_bus_configure_settings(child);
|
||||||
pci_bus_add_devices(bus);
|
pci_bus_add_devices(bus);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user