* [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work @ 2010-11-30 18:53 Lukas Hejtmanek 2010-12-01 2:58 ` Calvin Walton 0 siblings, 1 reply; 10+ messages in thread From: Lukas Hejtmanek @ 2010-11-30 18:53 UTC (permalink / raw) To: linux-kernel Hi, in 2.6.26, mute button worked as expected on my ThinkPad T61 - it toggled mute with mixer applet notification. In 2.6.37-rc1, it only mutes without any event to any mixer applet. -- Lukáš Hejtmánek ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-11-30 18:53 [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work Lukas Hejtmanek @ 2010-12-01 2:58 ` Calvin Walton 2010-12-01 8:08 ` Lukas Hejtmanek ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Calvin Walton @ 2010-12-01 2:58 UTC (permalink / raw) To: Lukas Hejtmanek; +Cc: linux-kernel On Tue, 2010-11-30 at 19:53 +0100, Lukas Hejtmanek wrote: > Hi, > > in 2.6.26, mute button worked as expected on my ThinkPad T61 - it toggled > mute with mixer applet notification. In 2.6.37-rc1, it only mutes without any > event to any mixer applet. The mute button on this series of Thinkpads is a little weird (I have an R61i, which is the same iirc) - the behaviour of the button depends on the ACPI firmware. With no operating system running, it behaves as a persistent hardware mute. Windows apparently uses a proprietary driver to control the volume - part of this functionality has been added to the Linux thinkpad_acpi driver, but it's not fully enabled yet. By default on this series of laptops, Linux runs with the ACPI _OSI(Linux) exported - when the bios of this laptop model sees that it's running on Linux, it disables the hardware mute functionality and the mute button acts as a standard keyboard key. Search your dmesg for lines containing '_OSI(Linux)' - it should say that a BIOS query was honoured. Make sure you do not have 'acpi_osi="! Linux"' on your kernel command line. -- Calvin Walton <calvin.walton@gmail.com> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-12-01 2:58 ` Calvin Walton @ 2010-12-01 8:08 ` Lukas Hejtmanek 2010-12-01 22:54 ` Lukas Hejtmanek 2010-12-03 14:13 ` Lukas Hejtmanek 2 siblings, 0 replies; 10+ messages in thread From: Lukas Hejtmanek @ 2010-12-01 8:08 UTC (permalink / raw) To: Calvin Walton; +Cc: linux-kernel On Tue, Nov 30, 2010 at 09:58:44PM -0500, Calvin Walton wrote: > The mute button on this series of Thinkpads is a little weird (I have an > R61i, which is the same iirc) - the behaviour of the button depends on > the ACPI firmware. With no operating system running, it behaves as a > persistent hardware mute. Windows apparently uses a proprietary driver > to control the volume - part of this functionality has been added to the > Linux thinkpad_acpi driver, but it's not fully enabled yet. Behaviour in 2.6.36 kernel is OK as expected. Something broken it in 2.6.37-rc1. > Search your dmesg for lines containing '_OSI(Linux)' - it should say > that a BIOS query was honoured. Make sure you do not have 'acpi_osi="! > Linux"' on your kernel command line. [ 0.000000] ACPI: DMI detected: Lenovo ThinkPad T61 [ 0.000000] ACPI: Added _OSI(Linux) looks good. -- Lukáš Hejtmánek ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-12-01 2:58 ` Calvin Walton 2010-12-01 8:08 ` Lukas Hejtmanek @ 2010-12-01 22:54 ` Lukas Hejtmanek 2010-12-03 14:13 ` Lukas Hejtmanek 2 siblings, 0 replies; 10+ messages in thread From: Lukas Hejtmanek @ 2010-12-01 22:54 UTC (permalink / raw) To: Calvin Walton; +Cc: linux-kernel On Tue, Nov 30, 2010 at 09:58:44PM -0500, Calvin Walton wrote: > Search your dmesg for lines containing '_OSI(Linux)' - it should say > that a BIOS query was honoured. Make sure you do not have 'acpi_osi="! > Linux"' on your kernel command line. the difference between working and non working seems to be in: ACPI: BIOS _OSI(Linux) query honored via DMI and ACPI: BIOS _OSI(Linux) query honored via cmdline via DMI seems to be working as expected, via cmdline does not work. Any ideas? -- Lukáš Hejtmánek ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-12-01 2:58 ` Calvin Walton 2010-12-01 8:08 ` Lukas Hejtmanek 2010-12-01 22:54 ` Lukas Hejtmanek @ 2010-12-03 14:13 ` Lukas Hejtmanek 2010-12-06 1:37 ` Lin Ming 2 siblings, 1 reply; 10+ messages in thread From: Lukas Hejtmanek @ 2010-12-03 14:13 UTC (permalink / raw) To: ming.m.lin, robert.moore, len.brown; +Cc: Calvin Walton, linux-kernel Hi, On Tue, Nov 30, 2010 at 09:58:44PM -0500, Calvin Walton wrote: > > in 2.6.36, mute button worked as expected on my ThinkPad T61 - it toggled > > mute with mixer applet notification. In 2.6.37-rc1, it only mutes without any > > event to any mixer applet. [...] > By default on this series of laptops, Linux runs with the ACPI > _OSI(Linux) exported - when the bios of this laptop model sees that it's > running on Linux, it disables the hardware mute functionality and the > mute button acts as a standard keyboard key. > > Search your dmesg for lines containing '_OSI(Linux)' - it should say > that a BIOS query was honoured. Make sure you do not have 'acpi_osi="! > Linux"' on your kernel command line. The breaking commit is this one: b0ed7a915abac309fcb5a51bccd3782e3daa7417 This changes [ 0.200241] ACPI: BIOS _OSI(Linux) query honored via DMI to [ 0.200241] ACPI: BIOS _OSI(Linux) query honored via cmdline which apparently does not work with Lenovo T61. -- Lukáš Hejtmánek ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-12-03 14:13 ` Lukas Hejtmanek @ 2010-12-06 1:37 ` Lin Ming 2010-12-06 9:31 ` Lukas Hejtmanek 0 siblings, 1 reply; 10+ messages in thread From: Lin Ming @ 2010-12-06 1:37 UTC (permalink / raw) To: Lukas Hejtmanek Cc: Moore, Robert, Brown, Len, Calvin Walton, linux-kernel@vger.kernel.org On Fri, 2010-12-03 at 22:13 +0800, Lukas Hejtmanek wrote: > Hi, > > On Tue, Nov 30, 2010 at 09:58:44PM -0500, Calvin Walton wrote: > > > in 2.6.36, mute button worked as expected on my ThinkPad T61 - it toggled > > > mute with mixer applet notification. In 2.6.37-rc1, it only mutes without any > > > event to any mixer applet. > > [...] > > > By default on this series of laptops, Linux runs with the ACPI > > _OSI(Linux) exported - when the bios of this laptop model sees that it's > > running on Linux, it disables the hardware mute functionality and the > > mute button acts as a standard keyboard key. > > > > Search your dmesg for lines containing '_OSI(Linux)' - it should say > > that a BIOS query was honoured. Make sure you do not have 'acpi_osi="! > > Linux"' on your kernel command line. > > The breaking commit is this one: b0ed7a915abac309fcb5a51bccd3782e3daa7417 > > This changes > [ 0.200241] ACPI: BIOS _OSI(Linux) query honored via DMI > to > [ 0.200241] ACPI: BIOS _OSI(Linux) query honored via cmdline > > which apparently does not work with Lenovo T61. I'm looking at this regression. Thanks, Lin Ming ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-12-06 1:37 ` Lin Ming @ 2010-12-06 9:31 ` Lukas Hejtmanek 2010-12-06 9:42 ` Lin Ming 2010-12-07 3:19 ` Lin Ming 0 siblings, 2 replies; 10+ messages in thread From: Lukas Hejtmanek @ 2010-12-06 9:31 UTC (permalink / raw) To: Lin Ming Cc: Moore, Robert, Brown, Len, Calvin Walton, linux-kernel@vger.kernel.org On Mon, Dec 06, 2010 at 09:37:04AM +0800, Lin Ming wrote: > > which apparently does not work with Lenovo T61. > > I'm looking at this regression. I did some debugging. It looks like this: [ 0.000000] ACPI: DMI detected: Lenovo ThinkPad T61 [ 0.000000] ACPI: Set_osi_linux Added _OSI(Linux) [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.37-rc3+ #122 [ 0.000000] Call Trace: [ 0.000000] [<ffffffff8162c0a1>] ? set_osi_linux+0x4b/0x6b [ 0.000000] [<ffffffff8162bbe7>] ? dmi_enable_osi_linux+0x11/0x18 [ 0.000000] [<ffffffff812f7313>] ? dmi_check_system+0x33/0x50 [ 0.000000] [<ffffffff8162bdc2>] ? acpi_blacklisted+0x16a/0x190 [ 0.000000] [<ffffffff81617b6e>] ? acpi_boot_table_init+0x3a/0x75 [ 0.000000] [<ffffffff81611cf3>] ? setup_arch+0x6d5/0x7a8 [ 0.000000] [<ffffffff814072f2>] ? printk+0x40/0x46 [ 0.000000] [<ffffffff816108de>] ? start_kernel+0xbe/0x323 [ 0.000000] [<ffffffff816103de>] ? x86_64_start_kernel+0xf9/0xff after this call, osi_linux.dmi is set. However, after this call: [ 0.186721] Call Trace: [ 0.186721] [<ffffffff8120ecad>] ? acpi_install_interface_handler+0x4d/0x56 [ 0.186750] [<ffffffff8162c0a1>] ? set_osi_linux+0x4b/0x6b [ 0.186777] [<ffffffff811edefa>] ? acpi_os_initialize1+0x10f/0x13d [ 0.186803] [<ffffffff8162c3fa>] ? acpi_bus_init+0xa/0x1e2 [ 0.186829] [<ffffffff811c498c>] ? kobject_create_and_add+0x3c/0x80 [ 0.186855] [<ffffffff8162c63b>] ? acpi_init+0x69/0xdf [ 0.186880] [<ffffffff810002da>] ? do_one_initcall+0x3a/0x170 [ 0.186906] [<ffffffff81610c75>] ? kernel_init+0x132/0x1be [ 0.186932] [<ffffffff81003b94>] ? kernel_thread_helper+0x4/0x10 [ 0.186958] [<ffffffff81610b43>] ? kernel_init+0x0/0x1be [ 0.187577] [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10 osi_linux.cmdline is set. -- Lukáš Hejtmánek ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-12-06 9:31 ` Lukas Hejtmanek @ 2010-12-06 9:42 ` Lin Ming 2010-12-07 3:19 ` Lin Ming 1 sibling, 0 replies; 10+ messages in thread From: Lin Ming @ 2010-12-06 9:42 UTC (permalink / raw) To: Lukas Hejtmanek Cc: Moore, Robert, Brown, Len, Calvin Walton, linux-kernel@vger.kernel.org On Mon, 2010-12-06 at 17:31 +0800, Lukas Hejtmanek wrote: > On Mon, Dec 06, 2010 at 09:37:04AM +0800, Lin Ming wrote: > > > which apparently does not work with Lenovo T61. > > > > I'm looking at this regression. > > I did some debugging. It looks like this: > [ 0.000000] ACPI: DMI detected: Lenovo ThinkPad T61 > [ 0.000000] ACPI: Set_osi_linux Added _OSI(Linux) > [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.37-rc3+ #122 > [ 0.000000] Call Trace: > [ 0.000000] [<ffffffff8162c0a1>] ? set_osi_linux+0x4b/0x6b > [ 0.000000] [<ffffffff8162bbe7>] ? dmi_enable_osi_linux+0x11/0x18 > [ 0.000000] [<ffffffff812f7313>] ? dmi_check_system+0x33/0x50 > [ 0.000000] [<ffffffff8162bdc2>] ? acpi_blacklisted+0x16a/0x190 > [ 0.000000] [<ffffffff81617b6e>] ? acpi_boot_table_init+0x3a/0x75 > [ 0.000000] [<ffffffff81611cf3>] ? setup_arch+0x6d5/0x7a8 > [ 0.000000] [<ffffffff814072f2>] ? printk+0x40/0x46 > [ 0.000000] [<ffffffff816108de>] ? start_kernel+0xbe/0x323 > [ 0.000000] [<ffffffff816103de>] ? x86_64_start_kernel+0xf9/0xff > > after this call, osi_linux.dmi is set. > > However, after this call: > [ 0.186721] Call Trace: > [ 0.186721] [<ffffffff8120ecad>] ? acpi_install_interface_handler+0x4d/0x56 > [ 0.186750] [<ffffffff8162c0a1>] ? set_osi_linux+0x4b/0x6b > [ 0.186777] [<ffffffff811edefa>] ? acpi_os_initialize1+0x10f/0x13d > [ 0.186803] [<ffffffff8162c3fa>] ? acpi_bus_init+0xa/0x1e2 > [ 0.186829] [<ffffffff811c498c>] ? kobject_create_and_add+0x3c/0x80 > [ 0.186855] [<ffffffff8162c63b>] ? acpi_init+0x69/0xdf > [ 0.186880] [<ffffffff810002da>] ? do_one_initcall+0x3a/0x170 > [ 0.186906] [<ffffffff81610c75>] ? kernel_init+0x132/0x1be > [ 0.186932] [<ffffffff81003b94>] ? kernel_thread_helper+0x4/0x10 > [ 0.186958] [<ffffffff81610b43>] ? kernel_init+0x0/0x1be > [ 0.187577] [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10 > > osi_linux.cmdline is set. Do you have acpi_osi=Linux in kernel boot parameters? Please attach the dmesg. Thanks. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-12-06 9:31 ` Lukas Hejtmanek 2010-12-06 9:42 ` Lin Ming @ 2010-12-07 3:19 ` Lin Ming 2010-12-08 12:34 ` Lukas Hejtmanek 1 sibling, 1 reply; 10+ messages in thread From: Lin Ming @ 2010-12-07 3:19 UTC (permalink / raw) To: Lukas Hejtmanek Cc: Moore, Robert, Brown, Len, Calvin Walton, linux-kernel@vger.kernel.org On Mon, 2010-12-06 at 17:31 +0800, Lukas Hejtmanek wrote: > On Mon, Dec 06, 2010 at 09:37:04AM +0800, Lin Ming wrote: > > > which apparently does not work with Lenovo T61. > > > > I'm looking at this regression. > > I did some debugging. It looks like this: > [ 0.000000] ACPI: DMI detected: Lenovo ThinkPad T61 > [ 0.000000] ACPI: Set_osi_linux Added _OSI(Linux) > [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.37-rc3+ #122 > [ 0.000000] Call Trace: > [ 0.000000] [<ffffffff8162c0a1>] ? set_osi_linux+0x4b/0x6b > [ 0.000000] [<ffffffff8162bbe7>] ? dmi_enable_osi_linux+0x11/0x18 > [ 0.000000] [<ffffffff812f7313>] ? dmi_check_system+0x33/0x50 > [ 0.000000] [<ffffffff8162bdc2>] ? acpi_blacklisted+0x16a/0x190 > [ 0.000000] [<ffffffff81617b6e>] ? acpi_boot_table_init+0x3a/0x75 > [ 0.000000] [<ffffffff81611cf3>] ? setup_arch+0x6d5/0x7a8 > [ 0.000000] [<ffffffff814072f2>] ? printk+0x40/0x46 > [ 0.000000] [<ffffffff816108de>] ? start_kernel+0xbe/0x323 > [ 0.000000] [<ffffffff816103de>] ? x86_64_start_kernel+0xf9/0xff > > after this call, osi_linux.dmi is set. > > However, after this call: > [ 0.186721] Call Trace: > [ 0.186721] [<ffffffff8120ecad>] ? acpi_install_interface_handler+0x4d/0x56 > [ 0.186750] [<ffffffff8162c0a1>] ? set_osi_linux+0x4b/0x6b > [ 0.186777] [<ffffffff811edefa>] ? acpi_os_initialize1+0x10f/0x13d > [ 0.186803] [<ffffffff8162c3fa>] ? acpi_bus_init+0xa/0x1e2 > [ 0.186829] [<ffffffff811c498c>] ? kobject_create_and_add+0x3c/0x80 > [ 0.186855] [<ffffffff8162c63b>] ? acpi_init+0x69/0xdf > [ 0.186880] [<ffffffff810002da>] ? do_one_initcall+0x3a/0x170 > [ 0.186906] [<ffffffff81610c75>] ? kernel_init+0x132/0x1be > [ 0.186932] [<ffffffff81003b94>] ? kernel_thread_helper+0x4/0x10 > [ 0.186958] [<ffffffff81610b43>] ? kernel_init+0x0/0x1be > [ 0.187577] [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10 > > osi_linux.cmdline is set. Hi, Would you please try below patch? Thanks. --- drivers/acpi/osl.c | 55 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 32 insertions(+), 23 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 966fedd..f620689 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -152,8 +152,7 @@ static struct osi_linux { unsigned int enable:1; unsigned int dmi:1; unsigned int cmdline:1; - unsigned int known:1; -} osi_linux = { 0, 0, 0, 0}; +} osi_linux = {0, 0, 0}; static u32 acpi_osi_handler(acpi_string interface, u32 supported) { @@ -1055,18 +1054,25 @@ static int __init acpi_os_name_setup(char *str) __setup("acpi_os_name=", acpi_os_name_setup); +static void __init osi_setup(char *str) +{ + if (str == NULL || *str == '\0') { + printk(KERN_INFO PREFIX "_OSI method disabled\n"); + acpi_gbl_create_osi_method = FALSE; + } else { + strncpy(osi_setup_string, str, OSI_STRING_LENGTH_MAX); + } +} + static void __init set_osi_linux(unsigned int enable) { - if (osi_linux.enable != enable) { + if (osi_linux.enable != enable) osi_linux.enable = enable; - printk(KERN_NOTICE PREFIX "%sed _OSI(Linux)\n", - enable ? "Add": "Delet"); - } if (osi_linux.enable) - acpi_osi_setup("Linux"); + osi_setup("Linux"); else - acpi_osi_setup("!Linux"); + osi_setup("!Linux"); return; } @@ -1088,8 +1094,6 @@ void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d) if (enable == -1) return; - osi_linux.known = 1; /* DMI knows which OSI(Linux) default needed */ - set_osi_linux(enable); return; @@ -1105,31 +1109,36 @@ void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d) static void __init acpi_osi_setup_late(void) { char *str = osi_setup_string; + acpi_status status; if (*str == '\0') return; - if (!strcmp("!Linux", str)) { - acpi_cmdline_osi_linux(0); /* !enable */ - } else if (*str == '!') { - if (acpi_remove_interface(++str) == AE_OK) + if (*str == '!') { + status = acpi_remove_interface(++str); + + if (ACPI_SUCCESS(status)) printk(KERN_INFO PREFIX "Deleted _OSI(%s)\n", str); - } else if (!strcmp("Linux", str)) { - acpi_cmdline_osi_linux(1); /* enable */ } else { - if (acpi_install_interface(str) == AE_OK) + status = acpi_install_interface(str); + + if (ACPI_SUCCESS(status)) printk(KERN_INFO PREFIX "Added _OSI(%s)\n", str); } } int __init acpi_osi_setup(char *str) { - if (str == NULL || *str == '\0') { - printk(KERN_INFO PREFIX "_OSI method disabled\n"); - acpi_gbl_create_osi_method = FALSE; - } else { - strncpy(osi_setup_string, str, OSI_STRING_LENGTH_MAX); - } + /* kernel command line overrides DMI */ + osi_linux.dmi = 0; + osi_linux.enable = 0; + + if (str && !strcmp("Linux", str)) + acpi_cmdline_osi_linux(1); + else if (str && !strcmp("!Linux", str)) + acpi_cmdline_osi_linux(0); + else + osi_setup(str); return 1; } ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work 2010-12-07 3:19 ` Lin Ming @ 2010-12-08 12:34 ` Lukas Hejtmanek 0 siblings, 0 replies; 10+ messages in thread From: Lukas Hejtmanek @ 2010-12-08 12:34 UTC (permalink / raw) To: Lin Ming Cc: Moore, Robert, Brown, Len, Calvin Walton, linux-kernel@vger.kernel.org On Tue, Dec 07, 2010 at 11:19:27AM +0800, Lin Ming wrote: > Would you please try below patch? yes, the patch fixed my problem with the mute button. Thanks. > Thanks. > > --- > drivers/acpi/osl.c | 55 ++++++++++++++++++++++++++++++--------------------- > 1 files changed, 32 insertions(+), 23 deletions(-) > > diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c > index 966fedd..f620689 100644 > --- a/drivers/acpi/osl.c > +++ b/drivers/acpi/osl.c > @@ -152,8 +152,7 @@ static struct osi_linux { > unsigned int enable:1; > unsigned int dmi:1; > unsigned int cmdline:1; > - unsigned int known:1; > -} osi_linux = { 0, 0, 0, 0}; > +} osi_linux = {0, 0, 0}; > > static u32 acpi_osi_handler(acpi_string interface, u32 supported) > { > @@ -1055,18 +1054,25 @@ static int __init acpi_os_name_setup(char *str) > > __setup("acpi_os_name=", acpi_os_name_setup); > > +static void __init osi_setup(char *str) > +{ > + if (str == NULL || *str == '\0') { > + printk(KERN_INFO PREFIX "_OSI method disabled\n"); > + acpi_gbl_create_osi_method = FALSE; > + } else { > + strncpy(osi_setup_string, str, OSI_STRING_LENGTH_MAX); > + } > +} > + > static void __init set_osi_linux(unsigned int enable) > { > - if (osi_linux.enable != enable) { > + if (osi_linux.enable != enable) > osi_linux.enable = enable; > - printk(KERN_NOTICE PREFIX "%sed _OSI(Linux)\n", > - enable ? "Add": "Delet"); > - } > > if (osi_linux.enable) > - acpi_osi_setup("Linux"); > + osi_setup("Linux"); > else > - acpi_osi_setup("!Linux"); > + osi_setup("!Linux"); > > return; > } > @@ -1088,8 +1094,6 @@ void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d) > if (enable == -1) > return; > > - osi_linux.known = 1; /* DMI knows which OSI(Linux) default needed */ > - > set_osi_linux(enable); > > return; > @@ -1105,31 +1109,36 @@ void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d) > static void __init acpi_osi_setup_late(void) > { > char *str = osi_setup_string; > + acpi_status status; > > if (*str == '\0') > return; > > - if (!strcmp("!Linux", str)) { > - acpi_cmdline_osi_linux(0); /* !enable */ > - } else if (*str == '!') { > - if (acpi_remove_interface(++str) == AE_OK) > + if (*str == '!') { > + status = acpi_remove_interface(++str); > + > + if (ACPI_SUCCESS(status)) > printk(KERN_INFO PREFIX "Deleted _OSI(%s)\n", str); > - } else if (!strcmp("Linux", str)) { > - acpi_cmdline_osi_linux(1); /* enable */ > } else { > - if (acpi_install_interface(str) == AE_OK) > + status = acpi_install_interface(str); > + > + if (ACPI_SUCCESS(status)) > printk(KERN_INFO PREFIX "Added _OSI(%s)\n", str); > } > } > > int __init acpi_osi_setup(char *str) > { > - if (str == NULL || *str == '\0') { > - printk(KERN_INFO PREFIX "_OSI method disabled\n"); > - acpi_gbl_create_osi_method = FALSE; > - } else { > - strncpy(osi_setup_string, str, OSI_STRING_LENGTH_MAX); > - } > + /* kernel command line overrides DMI */ > + osi_linux.dmi = 0; > + osi_linux.enable = 0; > + > + if (str && !strcmp("Linux", str)) > + acpi_cmdline_osi_linux(1); > + else if (str && !strcmp("!Linux", str)) > + acpi_cmdline_osi_linux(0); > + else > + osi_setup(str); > > return 1; > } > -- Lukáš Hejtmánek ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-12-08 12:34 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-11-30 18:53 [Regression] 2.6.37-rc1: Lenovo T61 mute button does not work Lukas Hejtmanek 2010-12-01 2:58 ` Calvin Walton 2010-12-01 8:08 ` Lukas Hejtmanek 2010-12-01 22:54 ` Lukas Hejtmanek 2010-12-03 14:13 ` Lukas Hejtmanek 2010-12-06 1:37 ` Lin Ming 2010-12-06 9:31 ` Lukas Hejtmanek 2010-12-06 9:42 ` Lin Ming 2010-12-07 3:19 ` Lin Ming 2010-12-08 12:34 ` Lukas Hejtmanek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox