linux-surface/patches/4.18/0102-ACPI-Fix-gsbus-write-transaction-buffer-length.patch

38 lines
1.2 KiB
Diff

From 7a8233faf6364605bd6a2f2ca7f597db3e535084 Mon Sep 17 00:00:00 2001
From: qzed <qzed@users.noreply.github.com>
Date: Thu, 20 Sep 2018 00:29:50 +0200
Subject: [PATCH] ACPI: Fix gsbus write transaction buffer length
---
drivers/acpi/acpica/exfield.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index e75e84091617..cf547883a993 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -372,19 +372,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
} else if (obj_desc->field.region_obj->region.space_id ==
ACPI_ADR_SPACE_GSBUS) {
accessor_type = obj_desc->field.attribute;
- length =
- acpi_ex_get_serial_access_length(accessor_type,
- obj_desc->field.
- access_length);
-
- /*
- * Add additional 2 bytes for the generic_serial_bus data buffer:
- *
- * Status; (Byte 0 of the data buffer)
- * Length; (Byte 1 of the data buffer)
- * Data[x-1]: (Bytes 2-x of the arbitrary length data buffer)
- */
- length += 2;
+ length = source_desc->buffer.length;
function = ACPI_WRITE | (accessor_type << 16);
} else { /* IPMI */
--
2.19.0