Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Dec 2010 18:50:14 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216680 - head/sys/dev/acpica
Message-ID:  <201012231850.oBNIoEAL065887@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012231850.oBNIoEAL065887>