svn commit: r216680 - head/sys/dev/acpica

John Baldwin jhb at FreeBSD.org
Thu Dec 23 18:50:15 UTC 2010


Author: jhb
Date: Thu Dec 23 18:50:14 2010
New Revision: 216680
URL: http://svn.freebsd.org/changeset/base/216680

Log:
  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

Modified:
  head/sys/dev/acpica/acpi.c

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Thu Dec 23 15:17:28 2010	(r216679)
+++ head/sys/dev/acpica/acpi.c	Thu Dec 23 18:50:14 2010	(r216680)
@@ -1150,6 +1150,14 @@ acpi_reserve_resources(device_t dev)
 		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
 	     * let it be.  The resource range is already reserved so


More information about the svn-src-head mailing list