]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/acpi_ec_provide_non_interrupt_mode_boot_param.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / acpi_ec_provide_non_interrupt_mode_boot_param.patch
CommitLineData
2cb7cef9
BS
1From: Alexey Starikovskiy <astarikovskiy@suse.de>
2Subject: ACPI: EC: Don't degrade to poll mode at storm automatically.
3References: bnc#446142
4Patch-Mainline: no
5
6Signed-off-by: Thomas Renninger <trenn@suse.de>
7
8Not all users of semi-broken EC devices want to degrade to poll mode, so
9give them right to choose.
10
11Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
12---
13
14 Documentation/kernel-parameters.txt | 5 +++++
15 drivers/acpi/ec.c | 15 +++++++++++++++
16 2 files changed, 20 insertions(+)
17
18
19--- a/Documentation/kernel-parameters.txt
20+++ b/Documentation/kernel-parameters.txt
21@@ -706,6 +706,11 @@ and is between 256 and 4096 characters.
22
23 eata= [HW,SCSI]
24
25+ ec_intr= [HW,ACPI] ACPI Embedded Controller interrupt mode
26+ Format: <int>
27+ 0: polling mode
28+ non-0: interrupt mode (default)
29+
30 edd= [EDD]
31 Format: {"off" | "on" | "skip[mbr]"}
32
33--- a/drivers/acpi/ec.c
34+++ b/drivers/acpi/ec.c
35@@ -121,6 +121,8 @@ static struct acpi_ec {
36 spinlock_t curr_lock;
37 } *boot_ec, *first_ec;
38
39+int acpi_ec_intr = 1; /* Default is interrupt mode */
40+
41 /*
42 * Some Asus system have exchanged ECDT data/command IO addresses.
43 */
44@@ -902,6 +904,8 @@ static int ec_install_handlers(struct ac
45 &acpi_ec_gpe_handler, ec);
46 if (ACPI_FAILURE(status))
47 return -ENODEV;
48+ if (!acpi_ec_intr)
49+ set_bit(EC_FLAGS_NO_GPE, &ec->flags);
50 acpi_set_gpe_type(NULL, ec->gpe, ACPI_GPE_TYPE_RUNTIME);
51 acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
52 status = acpi_install_address_space_handler(ec->handle,
53@@ -1095,3 +1099,14 @@ static void __exit acpi_ec_exit(void)
54 return;
55 }
56 #endif /* 0 */
57+
58+static int __init acpi_ec_set_intr_mode(char *str)
59+{
60+ if (!get_option(&str, &acpi_ec_intr)) {
61+ acpi_ec_intr = 0;
62+ return 0;
63+ }
64+ return 1;
65+}
66+
67+__setup("ec_intr=", acpi_ec_set_intr_mode);