summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-04-14 02:17:00 +0000
committernjl <njl@FreeBSD.org>2004-04-14 02:17:00 +0000
commitfcb88d01946011442db8c092887de669ea1e3762 (patch)
treeac23702f676567178202a55286eb914f45488a1e /sys/contrib/dev/acpica
parentfbcf6e97006ab9a9ca6cff8822292461d95881b9 (diff)
downloadFreeBSD-src-fcb88d01946011442db8c092887de669ea1e3762.zip
FreeBSD-src-fcb88d01946011442db8c092887de669ea1e3762.tar.gz
Check in files with local changes:
* In the resume path, give up after waiting for a while for WAK_STS to be set. Some BIOSs never set it. * Allow access to the field if it is within the region size rounded up to a multiple of the access byte width. This overcomes "off-by-one" programming errors in the AML often found in Toshiba laptops.
Diffstat (limited to 'sys/contrib/dev/acpica')
-rw-r--r--sys/contrib/dev/acpica/exfldio.c4
-rw-r--r--sys/contrib/dev/acpica/hwsleep.c24
2 files changed, 20 insertions, 8 deletions
diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c
index 07c9c84..57a078e 100644
--- a/sys/contrib/dev/acpica/exfldio.c
+++ b/sys/contrib/dev/acpica/exfldio.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exfldio - Aml Field I/O
- * $Revision: 103 $
+ * $Revision: 104 $
*
*****************************************************************************/
@@ -352,7 +352,7 @@ AcpiExAccessRegion (
}
else if (Status == AE_NOT_EXIST)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_REPORT_ERROR ((
"Region %s(%X) has no handler\n",
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
diff --git a/sys/contrib/dev/acpica/hwsleep.c b/sys/contrib/dev/acpica/hwsleep.c
index ca0d057..c3a7b37 100644
--- a/sys/contrib/dev/acpica/hwsleep.c
+++ b/sys/contrib/dev/acpica/hwsleep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
- * $Revision: 65 $
+ * $Revision: 66 $
*
*****************************************************************************/
@@ -375,7 +375,11 @@ AcpiEnterSleepState (
}
}
- Status = AcpiHwDisableNonWakeupGpes ();
+ /*
+ * 1) Disable all runtime GPEs
+ * 2) Enable all wakeup GPEs
+ */
+ Status = AcpiHwPrepareGpesForSleep ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -526,7 +530,11 @@ AcpiEnterSleepStateS4bios (
return_ACPI_STATUS (Status);
}
- Status = AcpiHwDisableNonWakeupGpes ();
+ /*
+ * 1) Disable all runtime GPEs
+ * 2) Enable all wakeup GPEs
+ */
+ Status = AcpiHwPrepareGpesForSleep ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -646,10 +654,14 @@ AcpiLeaveSleepState (
{
ACPI_REPORT_ERROR (("Method _WAK failed, %s\n", AcpiFormatException (Status)));
}
+ /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
- /* _WAK returns stuff - do we want to look at it? */
-
- Status = AcpiHwEnableNonWakeupGpes ();
+ /*
+ * Restore the GPEs:
+ * 1) Disable all wakeup GPEs
+ * 2) Enable all runtime GPEs
+ */
+ Status = AcpiHwRestoreGpesOnWake ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
OpenPOWER on IntegriCloud