From owner-freebsd-acpi@FreeBSD.ORG Mon Sep 28 16:30:07 2009 Return-Path: Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A09C1065679 for ; Mon, 28 Sep 2009 16:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8138FC08 for ; Mon, 28 Sep 2009 16:30:07 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SGU6Mw098045 for ; Mon, 28 Sep 2009 16:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8SGU6Or098042; Mon, 28 Sep 2009 16:30:06 GMT (envelope-from gnats) Date: Mon, 28 Sep 2009 16:30:06 GMT Message-Id: <200909281630.n8SGU6Or098042@freefall.freebsd.org> To: freebsd-acpi@FreeBSD.org From: Ilya Bakulin Cc: Subject: Re: i386/136008: [acpi] Dell Vostro 1310 will not shutdown (Requires user intervention) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ilya Bakulin List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 16:30:07 -0000 The following reply was made to PR i386/136008; it has been noted by GNATS. From: Ilya Bakulin To: bug-followup@FreeBSD.org, dan@dburkland.com Cc: Subject: Re: i386/136008: [acpi] Dell Vostro 1310 will not shutdown (Requires user intervention) Date: Mon, 28 Sep 2009 20:27:18 +0400 --Sig_/EAzJ16sc/d0hEZlOsUlyXqA Content-Type: multipart/mixed; boundary="MP_/CraSF8uEy=eJAif63J7.+Ca" --MP_/CraSF8uEy=eJAif63J7.+Ca Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I have exactly the same laptop model with similar symptoms. It seems that EC cannot work in polled mode at all. Since FreeBSD ACPI code= disables GPEs on shutdown, it is not able to receive answer from EC, and r= eboots machine. Atached patch adds new sysctl "debug.acpi.ec.disable_polling", setting it t= o "1" resolves all described symptoms. --=20 Regards, Ilya Bakulin http://kibab.com xmpp://kibab612@jabber.ru --MP_/CraSF8uEy=eJAif63J7.+Ca Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=acpi_ec_addon.diff --- sys/dev/acpica/acpi_ec.c 2009-06-05 22:44:36.418313000 +0400 +++ sys/dev/acpica/acpi_ec.c 2009-09-04 15:49:54.000000000 +0400 @@ -197,6 +197,10 @@ SYSCTL_INT(_debug_acpi_ec, OID_AUTO, timeout, CTLFLAG_RW, &ec_timeout, EC_TIMEOUT, "Total time spent waiting for a response (poll+sleep)"); =20 +static int ec_disable_polling; +SYSCTL_INT(_debug_acpi_ec, OID_AUTO, disable_polling, CTLFLAG_RW, &ec_disa= ble_polling, 0, + "Totally disable use of polled mode (Dell EC problem workaround)"); + static ACPI_STATUS EcLock(struct acpi_ec_softc *sc) { @@ -577,7 +581,9 @@ =20 /* Disable the GPE so we don't get EC events during shutdown. */ sc =3D device_get_softc(dev); - AcpiDisableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR); + if (!ec_disable_polling) { + AcpiDisableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR); + } return (0); } =20 @@ -814,7 +820,7 @@ =20 ACPI_SERIAL_ASSERT(ec); Status =3D AE_NO_HARDWARE_RESPONSE; - int need_poll =3D cold || rebooting || ec_polled_mode || sc->ec_suspen= ding; + int need_poll =3D (cold || rebooting || ec_polled_mode || sc->ec_suspe= nding ) && !ec_disable_polling; /* * The main CPU should be much faster than the EC. So the status shou= ld * be "not ready" when we start waiting. But if the main CPU is really @@ -894,7 +900,11 @@ device_printf(sc->ec_dev, "wait timed out (%sresponse), forcing polled mode\n", Status =3D=3D AE_OK ? "" : "no "); - ec_polled_mode =3D TRUE; + if (ec_disable_polling) { + device_printf(sc->ec_dev, "Polling explicitly disabled! Continue waiting= for generated GPEs...\n"); + } else { + ec_polled_mode =3D TRUE; + } } } if (Status !=3D AE_OK) --MP_/CraSF8uEy=eJAif63J7.+Ca-- --Sig_/EAzJ16sc/d0hEZlOsUlyXqA Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkrA4+sACgkQo9vlj1oadwg8YwCfT2LuqsTHf77i3ObhIpV89YJd k2oAniZlLrJfVQSmFVf478sMnOA98xSJ =kZw9 -----END PGP SIGNATURE----- --Sig_/EAzJ16sc/d0hEZlOsUlyXqA--