linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI: EC: Drop EC noirq hooks to fix a regression
@ 2017-07-12  3:09 Lv Zheng
  2017-07-12  3:09 ` [PATCH 2/2] ACPI: EC: Revert "ACPI / EC: Enable event freeze mode..." " Lv Zheng
  2017-07-12 21:17 ` [PATCH 1/2] ACPI: EC: Drop EC noirq hooks " Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Lv Zheng @ 2017-07-12  3:09 UTC (permalink / raw)
  To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-kernel, linux-acpi, Stable # all applicable

According to the bug report, though the busy polling mode can make noirq
stages executed faster, it causes abnormal fan blowing up after a system
resume (see link #1 for a video demonstration) on Lenovo ThinkPad X1 Carbon
 - the 5th Generation. The problem can be fixed by an upgraded EC firmware.

However many reporters can also confirm that the problem can be fixed by
stopping busy polling during suspend/resume.

This patch drops noirq stage hooks so that the regression can be fixed
without upgrading the EC firmware.

Fixes: c3a696b6e8f8 ("ACPI / EC: Use busy polling mode when GPE is not enabled")
Link: https://youtu.be/9NQ9x-Jm99Q                       [#1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129
Reported-by: Andreas Lindhe <andreas@lindhe.io>
Tested-by: Gjorgji Jankovski <j.gjorgji@gmail.com>
Tested-by: Damjan Georgievski <gdamjan@gmail.com>
Tested-by: Fernando Chaves <nanochaves@gmail.com>
Tested-by: Tomislav Ivek <tomislav.ivek@gmail.com>
Tested-by: Denis P. <theoriginal.skullburner@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Stable <stable@vger.kernel.org> # all applicable
---
 drivers/acpi/ec.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 854d428..05e4eb5 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1870,24 +1870,6 @@ int __init acpi_ec_ecdt_probe(void)
 }
 
 #ifdef CONFIG_PM_SLEEP
-static int acpi_ec_suspend_noirq(struct device *dev)
-{
-	struct acpi_ec *ec =
-		acpi_driver_data(to_acpi_device(dev));
-
-	acpi_ec_enter_noirq(ec);
-	return 0;
-}
-
-static int acpi_ec_resume_noirq(struct device *dev)
-{
-	struct acpi_ec *ec =
-		acpi_driver_data(to_acpi_device(dev));
-
-	acpi_ec_leave_noirq(ec);
-	return 0;
-}
-
 static int acpi_ec_suspend(struct device *dev)
 {
 	struct acpi_ec *ec =
@@ -1909,7 +1891,6 @@ static int acpi_ec_resume(struct device *dev)
 #endif
 
 static const struct dev_pm_ops acpi_ec_pm = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend_noirq, acpi_ec_resume_noirq)
 	SET_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend, acpi_ec_resume)
 };
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ACPI: EC: Revert "ACPI / EC: Enable event freeze mode..." to fix a regression
  2017-07-12  3:09 [PATCH 1/2] ACPI: EC: Drop EC noirq hooks to fix a regression Lv Zheng
@ 2017-07-12  3:09 ` Lv Zheng
  2017-07-12 21:17 ` [PATCH 1/2] ACPI: EC: Drop EC noirq hooks " Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Lv Zheng @ 2017-07-12  3:09 UTC (permalink / raw)
  To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-kernel, linux-acpi, Stable # 4 . 9+

On Lenovo ThinkPad X1 Carbon - the 5th Generation, enabling an earlier EC
event freezing timing causes acpitz-virtual-0 to report a stucked 48C
temparature. And with EC firmware revisioned as 1.14, without reverting
back to old EC event freezing timing, the fan still blows up after a system
resume (see comment 168 on link #1).

This reverts the culprit change so that the regression can be fixed without
upgrading the EC firmware.

Fixes: d30283057ecd ("ACPI / EC: Enable event freeze mode to improve event handling")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=191181 [#1]
Tested-by: Damjan Georgievski <gdamjan@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Stable <stable@vger.kernel.org> # 4.9+
---
 drivers/acpi/ec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 05e4eb5..ddb01e9 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -147,7 +147,7 @@ static unsigned int ec_storm_threshold  __read_mostly = 8;
 module_param(ec_storm_threshold, uint, 0644);
 MODULE_PARM_DESC(ec_storm_threshold, "Maxim false GPE numbers not considered as GPE storm");
 
-static bool ec_freeze_events __read_mostly = true;
+static bool ec_freeze_events __read_mostly = false;
 module_param(ec_freeze_events, bool, 0644);
 MODULE_PARM_DESC(ec_freeze_events, "Disabling event handling during suspend/resume");
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ACPI: EC: Drop EC noirq hooks to fix a regression
  2017-07-12  3:09 [PATCH 1/2] ACPI: EC: Drop EC noirq hooks to fix a regression Lv Zheng
  2017-07-12  3:09 ` [PATCH 2/2] ACPI: EC: Revert "ACPI / EC: Enable event freeze mode..." " Lv Zheng
@ 2017-07-12 21:17 ` Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2017-07-12 21:17 UTC (permalink / raw)
  To: Lv Zheng
  Cc: Rafael J . Wysocki, Len Brown, Lv Zheng, linux-kernel,
	linux-acpi, Stable # all applicable

On Wednesday, July 12, 2017 11:09:09 AM Lv Zheng wrote:
> According to the bug report, though the busy polling mode can make noirq
> stages executed faster, it causes abnormal fan blowing up after a system
> resume (see link #1 for a video demonstration) on Lenovo ThinkPad X1 Carbon
>  - the 5th Generation. The problem can be fixed by an upgraded EC firmware.
> 
> However many reporters can also confirm that the problem can be fixed by
> stopping busy polling during suspend/resume.
> 
> This patch drops noirq stage hooks so that the regression can be fixed
> without upgrading the EC firmware.
> 
> Fixes: c3a696b6e8f8 ("ACPI / EC: Use busy polling mode when GPE is not enabled")
> Link: https://youtu.be/9NQ9x-Jm99Q                       [#1]
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129
> Reported-by: Andreas Lindhe <andreas@lindhe.io>
> Tested-by: Gjorgji Jankovski <j.gjorgji@gmail.com>
> Tested-by: Damjan Georgievski <gdamjan@gmail.com>
> Tested-by: Fernando Chaves <nanochaves@gmail.com>
> Tested-by: Tomislav Ivek <tomislav.ivek@gmail.com>
> Tested-by: Denis P. <theoriginal.skullburner@gmail.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> Cc: Stable <stable@vger.kernel.org> # all applicable

Both patches applied with some minor modifications in the changelogs.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-12 21:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12  3:09 [PATCH 1/2] ACPI: EC: Drop EC noirq hooks to fix a regression Lv Zheng
2017-07-12  3:09 ` [PATCH 2/2] ACPI: EC: Revert "ACPI / EC: Enable event freeze mode..." " Lv Zheng
2017-07-12 21:17 ` [PATCH 1/2] ACPI: EC: Drop EC noirq hooks " Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).