i386/136008: [acpi] Dell Vostro 1310 will not shutdown
(Requires user intervention)
Ilya Bakulin
webmaster at kibab.com
Mon Sep 28 16:30:07 UTC 2009
The following reply was made to PR i386/136008; it has been noted by GNATS.
From: Ilya Bakulin <webmaster at kibab.com>
To: bug-followup at FreeBSD.org, dan at 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--
More information about the freebsd-acpi
mailing list