[kernel] r15504 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Sat Apr 10 01:19:38 UTC 2010
Author: benh
Date: Sat Apr 10 01:19:17 2010
New Revision: 15504
Log:
ACPI: EC: Allow multibyte access to EC (Closes: #563313)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/12
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Fri Apr 9 21:38:21 2010 (r15503)
+++ dists/sid/linux-2.6/debian/changelog Sat Apr 10 01:19:17 2010 (r15504)
@@ -6,6 +6,8 @@
(Closes: #552299)
* drm/radeon: R300 AD only has one quad pipe (Closes: #575681)
* phylib: Fix typo in bcm63xx PHY driver table
+ * ACPI: EC: Allow multibyte access to EC; fixes temperature monitoring
+ on some Dell laptops (Closes: #563313)
[ maximilian attems]
* Ignore ABI breakage due to libata switch.
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch Sat Apr 10 01:19:17 2010 (r15504)
@@ -0,0 +1,91 @@
+From: Alexey Starikovskiy <astarikovskiy at suse.de>
+Date: Wed, 17 Mar 2010 13:14:13 -0400
+Subject: [PATCH] ACPI: EC: Allow multibyte access to EC
+
+commit dadf28a10c3eb29421837a2e413ab869ebd upstream
+
+http://bugzilla.kernel.org/show_bug.cgi?id=14667
+
+Signed-off-by: Alexey Starikovskiy <astarikovskiy at suse.de>
+Signed-off-by: Len Brown <len.brown at intel.com>
+[bwh: Backport to 2.6.32]
+--- a/drivers/acpi/acpica/exprep.c
++++ b/drivers/acpi/acpica/exprep.c
+@@ -468,6 +468,18 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
+
+ acpi_ut_add_reference(obj_desc->field.region_obj);
+
++ /* allow full data read from EC address space */
++ if (obj_desc->field.region_obj->region.space_id ==
++ ACPI_ADR_SPACE_EC) {
++ if (obj_desc->common_field.bit_length > 8)
++ obj_desc->common_field.access_bit_width =
++ ACPI_ROUND_UP(obj_desc->common_field.
++ bit_length, 8);
++ obj_desc->common_field.access_byte_width =
++ ACPI_DIV_8(obj_desc->common_field.
++ access_bit_width);
++ }
++
+ ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
+ "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
+ obj_desc->field.start_field_bit_offset,
+diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
+index 1ac28c6..7208a69 100644
+--- a/drivers/acpi/ec.c
++++ b/drivers/acpi/ec.c
+@@ -588,12 +588,12 @@ static u32 acpi_ec_gpe_handler(void *data)
+
+ static acpi_status
+ acpi_ec_space_handler(u32 function, acpi_physical_address address,
+- u32 bits, acpi_integer *value,
++ u32 bits, acpi_integer *value64,
+ void *handler_context, void *region_context)
+ {
+ struct acpi_ec *ec = handler_context;
+- int result = 0, i;
+- u8 temp = 0;
++ int result = 0, i, bytes = bits / 8;
++ u8 *value = (u8 *)value64;
+
+ if ((address > 0xFF) || !value || !handler_context)
+ return AE_BAD_PARAMETER;
+@@ -601,32 +601,15 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
+ if (function != ACPI_READ && function != ACPI_WRITE)
+ return AE_BAD_PARAMETER;
+
+- if (bits != 8 && acpi_strict)
+- return AE_BAD_PARAMETER;
+-
+- if (EC_FLAGS_MSI)
++ if (EC_FLAGS_MSI || bits > 8)
+ acpi_ec_burst_enable(ec);
+
+- if (function == ACPI_READ) {
+- result = acpi_ec_read(ec, address, &temp);
+- *value = temp;
+- } else {
+- temp = 0xff & (*value);
+- result = acpi_ec_write(ec, address, temp);
+- }
+-
+- for (i = 8; unlikely(bits - i > 0); i += 8) {
+- ++address;
+- if (function == ACPI_READ) {
+- result = acpi_ec_read(ec, address, &temp);
+- (*value) |= ((acpi_integer)temp) << i;
+- } else {
+- temp = 0xff & ((*value) >> i);
+- result = acpi_ec_write(ec, address, temp);
+- }
+- }
++ for (i = 0; i < bytes; ++i, ++address, ++value)
++ result = (function == ACPI_READ) ?
++ acpi_ec_read(ec, address, value) :
++ acpi_ec_write(ec, address, *value);
+
+- if (EC_FLAGS_MSI)
++ if (EC_FLAGS_MSI || bits > 8)
+ acpi_ec_burst_disable(ec);
+
+ switch (result) {
Modified: dists/sid/linux-2.6/debian/patches/series/12
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/12 Fri Apr 9 21:38:21 2010 (r15503)
+++ dists/sid/linux-2.6/debian/patches/series/12 Sat Apr 10 01:19:17 2010 (r15504)
@@ -2,3 +2,4 @@
+ bugfix/all/drm-radeon-R300-AD-only-has-one-quad-pipe.patch
+ features/all/drivers-block-drbd-add.patch
+ bugfix/all/phylib-fix-typo-in-bcm6xx-PHY-driver-table.patch
++ bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch
More information about the Kernel-svn-changes
mailing list