summaryrefslogtreecommitdiff
path: root/sys/contrib/dev
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2003-11-21 21:21:17 +0000
committerNate Lawson <njl@FreeBSD.org>2003-11-21 21:21:17 +0000
commit847c562d46cc7fb651d10fd9f93d6520535ab583 (patch)
treea687c18454ffd76156aa3414d65f1fbea7395849 /sys/contrib/dev
parent0e4c356acf20cd59b5324fe17acdab17bd069c31 (diff)
Notes
Diffstat (limited to 'sys/contrib/dev')
-rw-r--r--sys/contrib/dev/acpica/exfldio.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c
index 1cc535d09393..c1e7d595acd6 100644
--- a/sys/contrib/dev/acpica/exfldio.c
+++ b/sys/contrib/dev/acpica/exfldio.c
@@ -422,10 +422,10 @@ AcpiExFieldDatumIo (
/*
* The four types of fields are:
*
- * BufferFields - Read/write from/to a Buffer
- * RegionFields - Read/write from/to a Operation Region.
- * BankFields - Write to a Bank Register, then read/write from/to an OpRegion
- * IndexFields - Write to an Index Register, then read/write from/to a Data Register
+ * BufferField - Read/write from/to a Buffer
+ * RegionField - Read/write from/to a Operation Region.
+ * BankField - Write to a Bank Register, then read/write from/to an OpRegion
+ * IndexField - Write to an Index Register, then read/write from/to a Data Register
*/
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
{
@@ -523,27 +523,37 @@ AcpiExFieldDatumIo (
/* Write the index value to the IndexRegister (itself a RegionField) */
+ FieldDatumByteOffset += ObjDesc->IndexField.Value;
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
+ "Write to Index Register: Value %8.8X\n",
+ FieldDatumByteOffset));
+
Status = AcpiExInsertIntoField (ObjDesc->IndexField.IndexObj,
- &ObjDesc->IndexField.Value,
- sizeof (ObjDesc->IndexField.Value));
+ &FieldDatumByteOffset,
+ sizeof (FieldDatumByteOffset));
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
+ "I/O to Data Register: ValuePtr %p\n",
+ Value));
+
if (ReadWrite == ACPI_READ)
{
/* Read the datum from the DataRegister */
Status = AcpiExExtractFromField (ObjDesc->IndexField.DataObj,
- Value, ObjDesc->CommonField.AccessByteWidth);
+ Value, sizeof (ACPI_INTEGER));
}
else
{
- /* Write the datum to the Data register */
+ /* Write the datum to the DataRegister */
Status = AcpiExInsertIntoField (ObjDesc->IndexField.DataObj,
- Value, ObjDesc->CommonField.AccessByteWidth);
+ Value, sizeof (ACPI_INTEGER));
}
break;