diff options
Diffstat (limited to 'sys/contrib/dev/acpica/hwacpi.c')
-rw-r--r-- | sys/contrib/dev/acpica/hwacpi.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sys/contrib/dev/acpica/hwacpi.c b/sys/contrib/dev/acpica/hwacpi.c index e271965..e69ff83 100644 --- a/sys/contrib/dev/acpica/hwacpi.c +++ b/sys/contrib/dev/acpica/hwacpi.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface - * $Revision: 63 $ + * $Revision: 65 $ * *****************************************************************************/ @@ -196,7 +196,7 @@ AcpiHwSetMode ( */ if (!AcpiGbl_FADT->SmiCmd) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No SMI_CMD in FADT, mode transition failed.\n")); + ACPI_REPORT_ERROR (("No SMI_CMD in FADT, mode transition failed.\n")); return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE); } @@ -209,7 +209,7 @@ AcpiHwSetMode ( */ if (!AcpiGbl_FADT->AcpiEnable && !AcpiGbl_FADT->AcpiDisable) { - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "No mode transition supported in this system.\n")); + ACPI_REPORT_ERROR (("No ACPI mode transition supported in this system (enable/disable both zero)\n")); return_ACPI_STATUS (AE_OK); } @@ -242,6 +242,7 @@ AcpiHwSetMode ( if (ACPI_FAILURE (Status)) { + ACPI_REPORT_ERROR (("Could not write mode change, %s\n", AcpiFormatException (Status))); return_ACPI_STATUS (Status); } @@ -252,19 +253,17 @@ AcpiHwSetMode ( Retry = 3000; while (Retry) { - Status = AE_NO_HARDWARE_RESPONSE; - if (AcpiHwGetMode() == Mode) { ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Mode %X successfully enabled\n", Mode)); - Status = AE_OK; - break; + return_ACPI_STATUS (AE_OK); } AcpiOsStall(1000); Retry--; } - return_ACPI_STATUS (Status); + ACPI_REPORT_ERROR (("Hardware never changed modes\n")); + return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE); } @@ -290,6 +289,16 @@ AcpiHwGetMode (void) ACPI_FUNCTION_TRACE ("HwGetMode"); + + /* + * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, + * system does not support mode transition. + */ + if (!AcpiGbl_FADT->SmiCmd) + { + return_VALUE (ACPI_SYS_MODE_ACPI); + } + Status = AcpiGetRegister (ACPI_BITREG_SCI_ENABLE, &Value, ACPI_MTX_LOCK); if (ACPI_FAILURE (Status)) { |