pci_host_generic: allocate resources against devices
Fix up pci_host_generic.c and pci_host_generic_fdt.c to allocate resources against devices that requested them. Currently the allocation happens against the pcib, which is incorrect. This is needed for the upcoming changes for fixing up pci_host_generic_acpi.c Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D17656
This commit is contained in:
parent
36b6a94a13
commit
956387e5e9
@ -310,7 +310,7 @@ pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type,
|
||||
|
||||
rm = generic_pcie_rman(sc, type);
|
||||
if (rm == NULL)
|
||||
return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev,
|
||||
return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child,
|
||||
type, rid, start, end, count, flags));
|
||||
|
||||
if (bootverbose) {
|
||||
|
@ -423,6 +423,7 @@ generic_pcie_fdt_activate_resource(device_t dev, device_t child, int type,
|
||||
}
|
||||
break;
|
||||
case SYS_RES_MEMORY:
|
||||
case SYS_RES_IRQ:
|
||||
res = BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child,
|
||||
type, rid, r);
|
||||
break;
|
||||
@ -445,6 +446,7 @@ generic_pcie_fdt_deactivate_resource(device_t dev, device_t child, int type,
|
||||
switch(type) {
|
||||
case SYS_RES_IOPORT:
|
||||
case SYS_RES_MEMORY:
|
||||
case SYS_RES_IRQ:
|
||||
res = BUS_DEACTIVATE_RESOURCE(device_get_parent(dev), child,
|
||||
type, rid, r);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user