Index: sys/dev/pci/pci_host_generic.c =================================================================== --- sys/dev/pci/pci_host_generic.c +++ sys/dev/pci/pci_host_generic.c @@ -324,7 +324,7 @@ } static bool -generic_pcie_translate_resource(device_t dev, int type, rman_res_t start, +generic_pcie_translate_resource_end(device_t dev, int type, rman_res_t start, rman_res_t end, rman_res_t *new_start, rman_res_t *new_end) { struct generic_pcie_core_softc *sc; @@ -380,6 +380,16 @@ return (found); } +static int +generic_pcie_translate_resource(device_t bus, int type, + rman_res_t start, rman_res_t *newstart) +{ + rman_res_t newend; /* unused */ + + return (!generic_pcie_translate_resource_end( + bus, type, start, 0, newstart, &newend)); +} + struct resource * pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -404,7 +414,7 @@ type, rid, start, end, count, flags)); /* Translate the address from a PCI address to a physical address */ - if (!generic_pcie_translate_resource(dev, type, start, end, &phys_start, + if (!generic_pcie_translate_resource_end(dev, type, start, end, &phys_start, &phys_end)) { device_printf(dev, "Failed to translate resource %jx-%jx type %x for %s\n", @@ -456,7 +466,7 @@ start = rman_get_start(r); end = rman_get_end(r); - if (!generic_pcie_translate_resource(dev, type, start, end, &start, + if (!generic_pcie_translate_resource_end(dev, type, start, end, &start, &end)) return (EINVAL); rman_set_start(r, start); @@ -527,6 +537,7 @@ DEVMETHOD(bus_activate_resource, generic_pcie_activate_resource), DEVMETHOD(bus_deactivate_resource, generic_pcie_deactivate_resource), DEVMETHOD(bus_release_resource, pci_host_generic_core_release_resource), + DEVMETHOD(bus_translate_resource, generic_pcie_translate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),