patch-2.4.25 linux-2.4.25/drivers/acpi/hardware/hwacpi.c

Next file: linux-2.4.25/drivers/acpi/hardware/hwgpe.c
Previous file: linux-2.4.25/drivers/acpi/fan.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/drivers/acpi/hardware/hwacpi.c linux-2.4.25/drivers/acpi/hardware/hwacpi.c
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2003, R. Byron Moore
+ * Copyright (C) 2000 - 2004, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -119,7 +119,7 @@
 	 * system does not support mode transition.
 	 */
 	if (!acpi_gbl_FADT->smi_cmd) {
-		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);
 	}
 
@@ -131,7 +131,7 @@
 	 * transitions are not supported.
 	 */
 	if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) {
-		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);
 	}
 
@@ -162,6 +162,7 @@
 	}
 
 	if (ACPI_FAILURE (status)) {
+		ACPI_REPORT_ERROR (("Could not write mode change, %s\n", acpi_format_exception (status)));
 		return_ACPI_STATUS (status);
 	}
 
@@ -171,18 +172,16 @@
 	 */
 	retry = 3000;
 	while (retry) {
-		status = AE_NO_HARDWARE_RESPONSE;
-
 		if (acpi_hw_get_mode() == mode) {
 			ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Mode %X successfully enabled\n", mode));
-			status = AE_OK;
-			break;
+			return_ACPI_STATUS (AE_OK);
 		}
 		acpi_os_stall(1000);
 		retry--;
 	}
 
-	return_ACPI_STATUS (status);
+	ACPI_REPORT_ERROR (("Hardware never changed modes\n"));
+	return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE);
 }
 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)