From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 06:24:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DE5B1065698; Sun, 17 Jan 2010 06:24:24 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC1D8FC13; Sun, 17 Jan 2010 06:24:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H6OOki033393; Sun, 17 Jan 2010 06:24:24 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H6OOkj033391; Sun, 17 Jan 2010 06:24:24 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201001170624.o0H6OOkj033391@svn.freebsd.org> From: Mitsuru IWASAKI Date: Sun, 17 Jan 2010 06:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202456 - stable/7/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 06:24:24 -0000 Author: iwasaki Date: Sun Jan 17 06:24:24 2010 New Revision: 202456 URL: http://svn.freebsd.org/changeset/base/202456 Log: MFC r201605: Update acpi_ibm syctl nodes on resume. Modified: stable/7/sys/dev/acpi_support/acpi_ibm.c Modified: stable/7/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- stable/7/sys/dev/acpi_support/acpi_ibm.c Sun Jan 17 06:24:09 2010 (r202455) +++ stable/7/sys/dev/acpi_support/acpi_ibm.c Sun Jan 17 06:24:24 2010 (r202456) @@ -252,6 +252,7 @@ ACPI_SERIAL_DECL(ibm, "ACPI IBM extras") static int acpi_ibm_probe(device_t dev); static int acpi_ibm_attach(device_t dev); static int acpi_ibm_detach(device_t dev); +static int acpi_ibm_resume(device_t dev); static void ibm_led(void *softc, int onoff); static void ibm_led_task(struct acpi_ibm_softc *sc, int pending __unused); @@ -270,6 +271,7 @@ static device_method_t acpi_ibm_methods[ DEVMETHOD(device_probe, acpi_ibm_probe), DEVMETHOD(device_attach, acpi_ibm_attach), DEVMETHOD(device_detach, acpi_ibm_detach), + DEVMETHOD(device_resume, acpi_ibm_resume), {0, 0} }; @@ -435,6 +437,34 @@ acpi_ibm_detach(device_t dev) } static int +acpi_ibm_resume(device_t dev) +{ + struct acpi_ibm_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + ACPI_SERIAL_BEGIN(ibm); + for (int i = 0; acpi_ibm_sysctls[i].name != NULL; i++) { + int val; + + if ((acpi_ibm_sysctls[i].access & CTLFLAG_RD) == 0) { + continue; + } + + val = acpi_ibm_sysctl_get(sc, i); + + if ((acpi_ibm_sysctls[i].access & CTLFLAG_WR) == 0) { + continue; + } + + acpi_ibm_sysctl_set(sc, i, val); + } + ACPI_SERIAL_END(ibm); + + return (0); +} + +static int acpi_ibm_eventmask_set(struct acpi_ibm_softc *sc, int val) { ACPI_OBJECT arg[2];