Fix the PCI host generic FDT driver to call into the common code and not
recurse into itself. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
d2314cb3b9
commit
a54b7de02a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309328
@ -152,7 +152,7 @@ pci_host_generic_attach(device_t dev)
|
|||||||
device_printf(dev, "Bus is%s cache-coherent\n",
|
device_printf(dev, "Bus is%s cache-coherent\n",
|
||||||
sc->base.coherent ? "" : " not");
|
sc->base.coherent ? "" : " not");
|
||||||
|
|
||||||
error = pci_host_generic_attach(dev);
|
error = pci_host_generic_core_attach(dev);
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
@ -327,15 +327,15 @@ pci_host_generic_alloc_resource(device_t dev, device_t child, int type,
|
|||||||
|
|
||||||
#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
|
#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
|
||||||
if (type == PCI_RES_BUS) {
|
if (type == PCI_RES_BUS) {
|
||||||
return (pci_host_generic_alloc_resource(dev, child, type, rid,
|
return (pci_host_generic_core_alloc_resource(dev, child, type, rid,
|
||||||
start, end, count, flags));
|
start, end, count, flags));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* For PCIe devices that do not have FDT nodes, use PCIB method */
|
/* For PCIe devices that do not have FDT nodes, use PCIB method */
|
||||||
if ((int)ofw_bus_get_node(child) <= 0)
|
if ((int)ofw_bus_get_node(child) <= 0)
|
||||||
return (pci_host_generic_alloc_resource(dev, child, type, rid,
|
return (pci_host_generic_core_alloc_resource(dev, child, type,
|
||||||
start, end, count, flags));
|
rid, start, end, count, flags));
|
||||||
|
|
||||||
/* For other devices use OFW method */
|
/* For other devices use OFW method */
|
||||||
sc = device_get_softc(dev);
|
sc = device_get_softc(dev);
|
||||||
@ -377,8 +377,8 @@ pci_host_generic_alloc_resource(device_t dev, device_t child, int type,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (bus_generic_alloc_resource(dev, child, type, rid, start, end,
|
return (bus_generic_alloc_resource(dev, child, type, rid, start,
|
||||||
count, flags));
|
end, count, flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user