patch-2.4.0-prerelease linux/drivers/acpi/interpreter/amstoren.c

Next file: linux/drivers/acpi/interpreter/amstorob.c
Previous file: linux/drivers/acpi/interpreter/amstore.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test12/linux/drivers/acpi/interpreter/amstoren.c linux/drivers/acpi/interpreter/amstoren.c
@@ -3,7 +3,7 @@
  *
  * Module Name: amstoren - AML Interpreter object store support,
  *                         Store to Node (namespace object)
- *              $Revision: 21 $
+ *              $Revision: 24 $
  *
  *****************************************************************************/
 
@@ -430,10 +430,20 @@
 
 	case ACPI_TYPE_FIELD_UNIT:
 
+
+		/*
+		 * If the Field Buffer and Index have not been previously evaluated,
+		 * evaluate them and save the results.
+		 */
+		if (!(dest_desc->common.flags & AOPOBJ_DATA_VALID)) {
+			status = acpi_ds_get_field_unit_arguments (dest_desc);
+			if (ACPI_FAILURE (status)) {
+				return (status);
+			}
+		}
+
 		if ((!dest_desc->field_unit.container ||
-			ACPI_TYPE_BUFFER != dest_desc->field_unit.container->common.type ||
-			dest_desc->field_unit.sequence !=
-				dest_desc->field_unit.container->buffer.sequence))
+			ACPI_TYPE_BUFFER != dest_desc->field_unit.container->common.type))
 		{
 			status = AE_AML_INTERNAL;
 			goto clean_up_and_bail_out;
@@ -487,7 +497,12 @@
 
 	case ACPI_TYPE_NUMBER:
 
+
 		dest_desc->number.value = val_desc->number.value;
+
+		/* Truncate value if we are executing from a 32-bit ACPI table */
+
+		acpi_aml_truncate_for32bit_table (dest_desc, walk_state);
 		break;
 
 

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