From 0d81cf1227ed5d74ea06c5fecaaa84cdbeeaaab2 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 23 Dec 2010 18:50:14 +0000 Subject: [PATCH] Don't try to reserve a resource that is already allocated. If the ECDT table is present, then the acpi_ec(4) driver will allocate its resources from nexus0 before the acpi0 device reserves resources for child devices. Reviewed by: jkim --- sys/dev/acpica/acpi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 3319952e071e..585d1c5a208e 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1149,6 +1149,14 @@ acpi_reserve_resources(device_t dev) if (rle->type == SYS_RES_IRQ) continue; + /* + * Don't reserve the resource if it is already allocated. + * The acpi_ec(4) driver can allocate its resources early + * if ECDT is present. + */ + if (rle->res != NULL) + continue; + /* * Try to reserve the resource from our parent. If this * fails because the resource is a system resource, just