SRU request for LP#191137

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SRU request for LP#191137

Stefan Bader-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is preliminary. I try to get some more positive verifications ASAP.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/191137

SRU justification:

Impact: On several Sony laptop models the changes introduced by upstream
commit c04209a7948b95e8c52084e8595e74e9428653d3 to enable the EC handler
during scan will cause those machines to hang on boot.

Fix: There was a work-around to remove the quiet option on boot but it
seems the combination of two upstream fixes this for real. [patches
attached]

Testcase: Boot a Hardy kernel on one of the affected laptops with the
quiet option active (default) and it will hang. With the fixes this
should not happen.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIe3D2P+TjRTJVqvQRAskmAJ98i57lhdvKgWXN72wdlv1QReiKXACePtpm
rOdy6dUkC951Fo/3DHxzec4=
=nHc9
-----END PGP SIGNATURE-----

From 7252136dac6ddaf069392586caaccf9517bb34c3 Mon Sep 17 00:00:00 2001
From: Stefan Bader <[hidden email]>
Date: Mon, 14 Jul 2008 09:34:14 -0400
Subject: [PATCH] UBUNTU: ACPI: EC: Do the byte access with a fast path

 commit 3e71a87d03055de0b8c8e42aba758ee6494af083
 Author: Alexey Starikovskiy <[hidden email]>
 Date:   Fri Jan 11 02:42:51 2008 +0300

Specification allows only byte access for EC region, so
make it separate from bug-compatible multi-byte access.
Also do not allow return of garbage in supplied *value.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9341

Signed-off-by: Alexey Starikovskiy <[hidden email]>
Signed-off-by: Len Brown <[hidden email]>
Signed-off-by: Stefan Bader <[hidden email]>
---
 drivers/acpi/ec.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 987b967..5393942 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -573,7 +573,7 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
       void *handler_context, void *region_context)
 {
  struct acpi_ec *ec = handler_context;
- int result = 0, i = 0;
+ int result = 0, i;
  u8 temp = 0;
 
  if ((address > 0xFF) || !value || !handler_context)
@@ -585,7 +585,16 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
  if (bits != 8 && acpi_strict)
  return AE_BAD_PARAMETER;
 
- while (bits - i > 0) {
+ 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;
@@ -593,8 +602,6 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
  temp = 0xff & ((*value) >> i);
  result = acpi_ec_write(ec, address, temp);
  }
- i += 8;
- ++address;
  }
 
  switch (result) {
--
1.5.4.3


From 78e82f8b3a5c646fe91718cfa073b395d691cb8f Mon Sep 17 00:00:00 2001
From: Stefan Bader <[hidden email]>
Date: Mon, 14 Jul 2008 09:36:30 -0400
Subject: [PATCH] UBUNTU: ACPI: EC: Some hardware requires burst mode to operate properly

commit b3b233c7d948a5f55185fb5a1b248157b948a1e5
Author: Alexey Starikovskiy <[hidden email]>
Date:   Fri Jan 11 02:42:57 2008 +0300

ACPI: EC: Some hardware requires burst mode to operate properly

Burst mode temporary (50 ms) locks EC to do only transactions with
driver, without it some hardware returns abstract garbage.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9341

Signed-off-by: Alexey Starikovskiy <[hidden email]>
Signed-off-by: Len Brown <[hidden email]>
Signed-off-by: Stefan Bader <[hidden email]>
---
 drivers/acpi/ec.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 5393942..7222a18 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -585,6 +585,8 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
  if (bits != 8 && acpi_strict)
  return AE_BAD_PARAMETER;
 
+ acpi_ec_burst_enable(ec);
+
  if (function == ACPI_READ) {
  result = acpi_ec_read(ec, address, &temp);
  *value = temp;
@@ -604,6 +606,8 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
  }
  }
 
+ acpi_ec_burst_disable(ec);
+
  switch (result) {
  case -EINVAL:
  return AE_BAD_PARAMETER;
--
1.5.4.3


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: SRU request for LP#191137

Tim Gardner-2
Stefan Bader wrote:

> This is preliminary. I try to get some more positive verifications ASAP.
>
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/191137
>
> SRU justification:
>
> Impact: On several Sony laptop models the changes introduced by upstream
> commit c04209a7948b95e8c52084e8595e74e9428653d3 to enable the EC handler
> during scan will cause those machines to hang on boot.
>
> Fix: There was a work-around to remove the quiet option on boot but it
> seems the combination of two upstream fixes this for real. [patches
> attached]
>
> Testcase: Boot a Hardy kernel on one of the affected laptops with the
> quiet option active (default) and it will hang. With the fixes this
> should not happen.

Looks good. ACK
--
Tim Gardner [hidden email]

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team