]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ACPICA: ACPI 5: Update debug output for new notify values
authorBob Moore <robert.moore@intel.com>
Tue, 14 Feb 2012 10:23:39 +0000 (18:23 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 22 Mar 2012 05:44:57 +0000 (01:44 -0400)
Add new notify values, add support for "hardware specific" notifies.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/acpica/evmisc.c
drivers/acpi/acpica/utdecode.c
include/acpi/actypes.h

index 0912f62f05a0c584ca5d803ffd03244ff7f69729..51ef9f5e002da1048c4e99d2b8939d0c35976633 100644 (file)
@@ -108,27 +108,30 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
        ACPI_FUNCTION_NAME(ev_queue_notify_request);
 
        /*
-        * For value 3 (Ejection Request), some device method may need to be run.
-        * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need
-        *   to be run.
+        * For value 0x03 (Ejection Request), may need to run a device method.
+        * For value 0x02 (Device Wake), if _PRW exists, may need to run
+        *   the _PS0 method.
         * For value 0x80 (Status Change) on the power button or sleep button,
-        *   initiate soft-off or sleep operation?
+        *   initiate soft-off or sleep operation.
+        *
+        * For all cases, simply dispatch the notify to the handler.
         */
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-                         "Dispatching Notify on [%4.4s] Node %p Value 0x%2.2X (%s)\n",
-                         acpi_ut_get_node_name(node), node, notify_value,
-                         acpi_ut_get_notify_name(notify_value)));
+                         "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
+                         acpi_ut_get_node_name(node),
+                         acpi_ut_get_type_name(node->type), notify_value,
+                         acpi_ut_get_notify_name(notify_value), node));
 
        /* Get the notify object attached to the NS Node */
 
        obj_desc = acpi_ns_get_attached_object(node);
        if (obj_desc) {
 
-               /* We have the notify object, Get the right handler */
+               /* We have the notify object, Get the correct handler */
 
                switch (node->type) {
 
-                       /* Notify allowed only on these types */
+                       /* Notify is allowed only on these types */
 
                case ACPI_TYPE_DEVICE:
                case ACPI_TYPE_THERMAL:
@@ -152,7 +155,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
        }
 
        /*
-        * If there is any handler to run, schedule the dispatcher.
+        * If there is a handler to run, schedule the dispatcher.
         * Check for:
         * 1) Global system notify handler
         * 2) Global device notify handler
index d42ede5260c77cac6f9b947ec625c252ebe027bc..684849949bf3e64550e2a0cbb6e0f42d4525933b 100644 (file)
@@ -497,19 +497,20 @@ char *acpi_ut_get_mutex_name(u32 mutex_id)
 
 /* Names for Notify() values, used for debug output */
 
-static const char *acpi_gbl_notify_value_names[] = {
-       "Bus Check",
-       "Device Check",
-       "Device Wake",
-       "Eject Request",
-       "Device Check Light",
-       "Frequency Mismatch",
-       "Bus Mode Mismatch",
-       "Power Fault",
-       "Capabilities Check",
-       "Device PLD Check",
-       "Reserved",
-       "System Locality Update"
+static const char *acpi_gbl_notify_value_names[ACPI_NOTIFY_MAX + 1] = {
+       /* 00 */ "Bus Check",
+       /* 01 */ "Device Check",
+       /* 02 */ "Device Wake",
+       /* 03 */ "Eject Request",
+       /* 04 */ "Device Check Light",
+       /* 05 */ "Frequency Mismatch",
+       /* 06 */ "Bus Mode Mismatch",
+       /* 07 */ "Power Fault",
+       /* 08 */ "Capabilities Check",
+       /* 09 */ "Device PLD Check",
+       /* 10 */ "Reserved",
+       /* 11 */ "System Locality Update",
+       /* 12 */ "Shutdown Request"
 };
 
 const char *acpi_ut_get_notify_name(u32 notify_value)
@@ -519,9 +520,10 @@ const char *acpi_ut_get_notify_name(u32 notify_value)
                return (acpi_gbl_notify_value_names[notify_value]);
        } else if (notify_value <= ACPI_MAX_SYS_NOTIFY) {
                return ("Reserved");
-       } else {                /* Greater or equal to 0x80 */
-
-               return ("**Device Specific**");
+       } else if (notify_value <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY) {
+               return ("Device Specific");
+       } else {
+               return ("Hardware Specific");
        }
 }
 #endif
index d5dee7ce9474ee88c4bf3cda01339e74067311ad..48c4d5f8a4929d9d4edc385d6757cdd64db900b6 100644 (file)
@@ -532,8 +532,9 @@ typedef u64 acpi_integer;
 #define ACPI_NOTIFY_DEVICE_PLD_CHECK    (u8) 0x09
 #define ACPI_NOTIFY_RESERVED            (u8) 0x0A
 #define ACPI_NOTIFY_LOCALITY_UPDATE     (u8) 0x0B
+#define ACPI_NOTIFY_SHUTDOWN_REQUEST    (u8) 0x0C
 
-#define ACPI_NOTIFY_MAX                 0x0B
+#define ACPI_NOTIFY_MAX                 0x0C
 
 /*
  * Types associated with ACPI names and objects. The first group of
@@ -698,7 +699,8 @@ typedef u32 acpi_event_status;
 #define ACPI_ALL_NOTIFY                 (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
 #define ACPI_MAX_NOTIFY_HANDLER_TYPE    0x3
 
-#define ACPI_MAX_SYS_NOTIFY             0x7f
+#define ACPI_MAX_SYS_NOTIFY             0x7F
+#define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF
 
 /* Address Space (Operation Region) Types */