]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.40/acpi-ec-drop-ec-noirq-hooks-to-fix-a-regression.patch
3.18-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.40 / acpi-ec-drop-ec-noirq-hooks-to-fix-a-regression.patch
1 From 662591461c4b9a1e3b9b159dbf37648a585ebaae Mon Sep 17 00:00:00 2001
2 From: Lv Zheng <lv.zheng@intel.com>
3 Date: Wed, 12 Jul 2017 11:09:09 +0800
4 Subject: ACPI / EC: Drop EC noirq hooks to fix a regression
5
6 From: Lv Zheng <lv.zheng@intel.com>
7
8 commit 662591461c4b9a1e3b9b159dbf37648a585ebaae upstream.
9
10 According to bug reports, although the busy polling mode can make
11 noirq stages execute faster, it causes abnormal fan blowing up after
12 system resume (see the first link below for a video demonstration)
13 on Lenovo ThinkPad X1 Carbon - the 5th Generation. The problem can
14 be fixed by upgrading the EC firmware on that machine.
15
16 However, many reporters confirm that the problem can be fixed by
17 stopping busy polling during suspend/resume and for some of them
18 upgrading the EC firmware is not an option.
19
20 For this reason, drop the noirq stage hooks from the EC driver
21 to fix the regression.
22
23 Fixes: c3a696b6e8f8 (ACPI / EC: Use busy polling mode when GPE is not enabled)
24 Link: https://youtu.be/9NQ9x-Jm99Q
25 Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129
26 Reported-by: Andreas Lindhe <andreas@lindhe.io>
27 Tested-by: Gjorgji Jankovski <j.gjorgji@gmail.com>
28 Tested-by: Damjan Georgievski <gdamjan@gmail.com>
29 Tested-by: Fernando Chaves <nanochaves@gmail.com>
30 Tested-by: Tomislav Ivek <tomislav.ivek@gmail.com>
31 Tested-by: Denis P. <theoriginal.skullburner@gmail.com>
32 Signed-off-by: Lv Zheng <lv.zheng@intel.com>
33 Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
34 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35
36 ---
37 drivers/acpi/ec.c | 19 -------------------
38 1 file changed, 19 deletions(-)
39
40 --- a/drivers/acpi/ec.c
41 +++ b/drivers/acpi/ec.c
42 @@ -1865,24 +1865,6 @@ error:
43 }
44
45 #ifdef CONFIG_PM_SLEEP
46 -static int acpi_ec_suspend_noirq(struct device *dev)
47 -{
48 - struct acpi_ec *ec =
49 - acpi_driver_data(to_acpi_device(dev));
50 -
51 - acpi_ec_enter_noirq(ec);
52 - return 0;
53 -}
54 -
55 -static int acpi_ec_resume_noirq(struct device *dev)
56 -{
57 - struct acpi_ec *ec =
58 - acpi_driver_data(to_acpi_device(dev));
59 -
60 - acpi_ec_leave_noirq(ec);
61 - return 0;
62 -}
63 -
64 static int acpi_ec_suspend(struct device *dev)
65 {
66 struct acpi_ec *ec =
67 @@ -1904,7 +1886,6 @@ static int acpi_ec_resume(struct device
68 #endif
69
70 static const struct dev_pm_ops acpi_ec_pm = {
71 - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend_noirq, acpi_ec_resume_noirq)
72 SET_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend, acpi_ec_resume)
73 };
74