diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 7b79995fe22c..286d870d5966 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -891,10 +891,9 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, if (res == NULL) return (NULL); - /* Copy the bus tag from the pre-allocated resource. */ + /* Copy the bus tag and handle from the pre-allocated resource. */ rman_set_bustag(res, rman_get_bustag(rle->res)); - if (type == SYS_RES_IOPORT) - rman_set_bushandle(res, res->r_start); + rman_set_bushandle(res, rman_get_bushandle(res)); /* If requested, activate the resource using the parent's method. */ if (flags & RF_ACTIVE)