* [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
@ 2012-01-09 6:31 Lee, Chun-Yi
2012-01-09 8:01 ` Carlos Corbacho
0 siblings, 1 reply; 29+ messages in thread
From: Lee, Chun-Yi @ 2012-01-09 6:31 UTC (permalink / raw)
To: mjg
Cc: platform-driver-x86, Lee, Chun-Yi, Carlos Corbacho,
Dmitry Torokhov, Corentin Chary, Thomas Renninger
From: "Lee, Chun-Yi" <jlee@suse.com>
Have many non-acer machines have AMW0_GUID2 method in DSDT, in
original acer-wmi design, driver direct set ACER_CAP_WIRELESS flag
for those machines but didn't check the functionality for set/get
wireless state.
It causes acer-wmi driver create a broken wireless rfkill and it
already set to soft blocked.
So, this patch add a wireless capability check before we set
ACER_CAP_WIRELESS flag to the machines that were included AMW0_GUID2.
It avoid acer-wmi create a broken wireless rfkill.
Thank's for Matthew Garrett give the idea.
Reference: brc#674353
https://bugzilla.redhat.com/show_bug.cgi?id=674353
Tested on Lenovo E520.
Tested on Acer TravelMate 4750.
Tested-by: mr.kobzar <mr.kobzar@gmail.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
drivers/platform/x86/acer-wmi.c | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 88dfecf..5dfa46a 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -678,6 +678,37 @@ static acpi_status AMW0_find_mailled(void)
return AE_OK;
}
+static void AMW0_GUID2_set_capabilities(void)
+{
+ acpi_status status;
+ u32 original_state, new_state;
+
+ /* set wireless capability when detected has quirk */
+ if (quirks->wireless > 0) {
+ interface->capability |= ACER_CAP_WIRELESS;
+ return;
+ }
+
+ status = AMW0_get_u32(&original_state, ACER_CAP_WIRELESS);
+ if (ACPI_FAILURE(status))
+ return;
+
+ status = AMW0_set_u32(!original_state, ACER_CAP_WIRELESS);
+ if (ACPI_FAILURE(status))
+ return;
+
+ status = AMW0_get_u32(&new_state, ACER_CAP_WIRELESS);
+ if (ACPI_FAILURE(status))
+ return;
+
+ status = AMW0_set_u32(original_state, ACER_CAP_WIRELESS);
+ if (ACPI_FAILURE(status))
+ return;
+
+ if (new_state != original_state)
+ interface->capability |= ACER_CAP_WIRELESS;
+}
+
static acpi_status AMW0_set_capabilities(void)
{
struct wmab_args args;
@@ -691,7 +722,7 @@ static acpi_status AMW0_set_capabilities(void)
* work.
*/
if (wmi_has_guid(AMW0_GUID2)) {
- interface->capability |= ACER_CAP_WIRELESS;
+ AMW0_GUID2_set_capabilities();
return AE_OK;
}
--
1.7.7
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-09 6:31 [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines Lee, Chun-Yi
@ 2012-01-09 8:01 ` Carlos Corbacho
2012-01-09 10:00 ` joeyli
0 siblings, 1 reply; 29+ messages in thread
From: Carlos Corbacho @ 2012-01-09 8:01 UTC (permalink / raw)
To: Lee, Chun-Yi
Cc: mjg, platform-driver-x86, Lee, Chun-Yi, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
On Monday 09 Jan 2012 14:31:17 Lee, Chun-Yi wrote:
> From: "Lee, Chun-Yi" <jlee@suse.com>
>
> Have many non-acer machines have AMW0_GUID2 method in DSDT, in
> original acer-wmi design, driver direct set ACER_CAP_WIRELESS flag
> for those machines but didn't check the functionality for set/get
> wireless state.
> It causes acer-wmi driver create a broken wireless rfkill and it
> already set to soft blocked.
>
> So, this patch add a wireless capability check before we set
> ACER_CAP_WIRELESS flag to the machines that were included AMW0_GUID2.
> It avoid acer-wmi create a broken wireless rfkill.
>
> Thank's for Matthew Garrett give the idea.
>
> Reference: brc#674353
> https://bugzilla.redhat.com/show_bug.cgi?id=674353
>
> Tested on Lenovo E520.
> Tested on Acer TravelMate 4750.
Is there really no other way to detect the availability of wireless on
hardware with that GUID without resorting to poking stuff to see if it sticks?
My assumption has always been that there must be of finding out, but I've never
had the hardware to check that with.
-Carlos
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-09 8:01 ` Carlos Corbacho
@ 2012-01-09 10:00 ` joeyli
2012-01-09 22:15 ` Carlos Corbacho
0 siblings, 1 reply; 29+ messages in thread
From: joeyli @ 2012-01-09 10:00 UTC (permalink / raw)
To: Carlos Corbacho
Cc: mjg, platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger
Hi Carios,
於 一,2012-01-09 於 08:01 +0000,Carlos Corbacho 提到:
> On Monday 09 Jan 2012 14:31:17 Lee, Chun-Yi wrote:
> > From: "Lee, Chun-Yi" <jlee@suse.com>
> >
> > Have many non-acer machines have AMW0_GUID2 method in DSDT, in
> > original acer-wmi design, driver direct set ACER_CAP_WIRELESS flag
> > for those machines but didn't check the functionality for set/get
> > wireless state.
> > It causes acer-wmi driver create a broken wireless rfkill and it
> > already set to soft blocked.
> >
> > So, this patch add a wireless capability check before we set
> > ACER_CAP_WIRELESS flag to the machines that were included AMW0_GUID2.
> > It avoid acer-wmi create a broken wireless rfkill.
> >
> > Thank's for Matthew Garrett give the idea.
> >
> > Reference: brc#674353
> > https://bugzilla.redhat.com/show_bug.cgi?id=674353
> >
> > Tested on Lenovo E520.
> > Tested on Acer TravelMate 4750.
>
> Is there really no other way to detect the availability of wireless on
> hardware with that GUID without resorting to poking stuff to see if it sticks?
>
> My assumption has always been that there must be of finding out, but I've never
> had the hardware to check that with.
>
> -Carlos
>
>
I just checked and found I also have no AMW0_GUID2 machines on my hand,
now.
I have some questions about AMW0_GUID2:
+ Why we enabled wireless capability in acer-wim if a non-acer machine has AMW0_GUID2 ?
+ I saw there have some magic number when you access AMW0_GUID1 (e.g. 0x9610, eax, ebx, ecx)
Could you please kindly teach me how can grab those value for AMW0_GUID2?
Does there have any useful dump or report log can provide by hardware owner?
Thanks a lot!
Joey Lee
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-09 10:00 ` joeyli
@ 2012-01-09 22:15 ` Carlos Corbacho
2012-01-11 4:26 ` joeyli
0 siblings, 1 reply; 29+ messages in thread
From: Carlos Corbacho @ 2012-01-09 22:15 UTC (permalink / raw)
To: joeyli
Cc: mjg, platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger
On Monday 09 Jan 2012 18:00:24 joeyli wrote:
> I just checked and found I also have no AMW0_GUID2 machines on my hand,
> now.
> I have some questions about AMW0_GUID2:
>
> + Why we enabled wireless capability in acer-wim if a non-acer machine has
> AMW0_GUID2 ?
IIRC, there were some bug reports on non-Acer hardware (I don't think this
involved Acer hardware, but this was some time ago...) where the wireless
detection wasn't working with this, but if we forced it on, it worked fine.
> + I saw there have some magic number when you access AMW0_GUID1 (e.g.
> 0x9610, eax, ebx, ecx) Could you please kindly teach me how can grab those
> value for AMW0_GUID2? Does there have any useful dump or report log can
> provide by hardware owner?
Probably not. For AMW0_GUID1, I got the stuff by using the Windows Kernel
Debugger remotely to see what my laptop was doing when changing things in
Windows - unfortunately that relied on a firewire port on the laptop, which I
suspect most people don't have.
The real problem is that I know almost nothing about AMW0_GUID2 - either what
it's used for or what it actually does, nor how hardware detection works with
it present (if at all).
-Carlos
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-09 22:15 ` Carlos Corbacho
@ 2012-01-11 4:26 ` joeyli
2012-01-11 16:54 ` Ike Panhc
0 siblings, 1 reply; 29+ messages in thread
From: joeyli @ 2012-01-11 4:26 UTC (permalink / raw)
To: Carlos Corbacho
Cc: mjg, platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger
於 一,2012-01-09 於 22:15 +0000,Carlos Corbacho 提到:
> On Monday 09 Jan 2012 18:00:24 joeyli wrote:
> > I just checked and found I also have no AMW0_GUID2 machines on my hand,
> > now.
> > I have some questions about AMW0_GUID2:
> >
> > + Why we enabled wireless capability in acer-wim if a non-acer machine has
> > AMW0_GUID2 ?
>
> IIRC, there were some bug reports on non-Acer hardware (I don't think this
> involved Acer hardware, but this was some time ago...) where the wireless
> detection wasn't working with this, but if we forced it on, it worked fine.
>
Yes, in acer-wmi supported some non-acer machine by quirk and read EC
register. That means we need find out EC register reflect to wifi RF
state if we are lucky.
Unfortunately, direct enable wireless capability causes some non-acer
machines' wireless rfkill always disabled. e.g. Lenovo E520
https://bugzilla.redhat.com/show_bug.cgi?id=674353
If we don't check the wireless capability, then they need manually add
acer-wmi to backlist. On some lenovo machines, ideapad-laptop driver
should support by lenovo's ACPI method.
> > + I saw there have some magic number when you access AMW0_GUID1 (e.g.
> > 0x9610, eax, ebx, ecx) Could you please kindly teach me how can grab those
> > value for AMW0_GUID2? Does there have any useful dump or report log can
> > provide by hardware owner?
>
> Probably not. For AMW0_GUID1, I got the stuff by using the Windows Kernel
> Debugger remotely to see what my laptop was doing when changing things in
> Windows - unfortunately that relied on a firewire port on the laptop, which I
> suspect most people don't have.
>
Thanks for your teach, but I never used Windows Kernel Debugger, if have
good chance, I will try.
Most of the state, bug reporter already removed OEM(Acer/Lenovo...)
specific Windows and hard to remote debug the machine.
> The real problem is that I know almost nothing about AMW0_GUID2 - either what
> it's used for or what it actually does, nor how hardware detection works with
> it present (if at all).
>
> -Carlos
>
I also don't have any information about AMW0_GUID2, almost all modern
Acer machine already removed AMW0_GUID2.
My humbly request is:
Please kindly accept this patch to acer-wmi, it can leave the wireless
rfkill state control by BIOS or other platform driver, and don't need
manually add acer-wmi to blacklist.
Thanks a lot!
Joey Lee
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-11 4:26 ` joeyli
@ 2012-01-11 16:54 ` Ike Panhc
2012-01-12 0:21 ` joeyli
` (2 more replies)
0 siblings, 3 replies; 29+ messages in thread
From: Ike Panhc @ 2012-01-11 16:54 UTC (permalink / raw)
To: joeyli
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
On 01/11/2012 12:26 PM, joeyli wrote:
> 於 一,2012-01-09 於 22:15 +0000,Carlos Corbacho 提到:
>> On Monday 09 Jan 2012 18:00:24 joeyli wrote:
>>> I just checked and found I also have no AMW0_GUID2 machines on my hand,
>>> now.
>>> I have some questions about AMW0_GUID2:
>>>
>>> + Why we enabled wireless capability in acer-wim if a non-acer machine has
>>> AMW0_GUID2 ?
>>
>> IIRC, there were some bug reports on non-Acer hardware (I don't think this
>> involved Acer hardware, but this was some time ago...) where the wireless
>> detection wasn't working with this, but if we forced it on, it worked fine.
>>
>
> Yes, in acer-wmi supported some non-acer machine by quirk and read EC
> register. That means we need find out EC register reflect to wifi RF
> state if we are lucky.
>
> Unfortunately, direct enable wireless capability causes some non-acer
> machines' wireless rfkill always disabled. e.g. Lenovo E520
>
> https://bugzilla.redhat.com/show_bug.cgi?id=674353
>
> If we don't check the wireless capability, then they need manually add
> acer-wmi to backlist. On some lenovo machines, ideapad-laptop driver
> should support by lenovo's ACPI method.
>
I've got two reports which says after poking the ec register, the phy0 rfkill reports hard blocked by mistake. And few hours ago I get the third report says the similar issue. I will summary the report.
I am thinking about alternative way
Since we have thinkpad_acpi and ideapad_laptop, both of them have rfkill capability. If there is VPC2004/IBM0068/LEN0068 in DSDT, then it will be fine if we do not register rfkill in acer-wmi.
Any thought?
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-11 16:54 ` Ike Panhc
@ 2012-01-12 0:21 ` joeyli
2012-01-25 1:18 ` Ike Panhc
2012-01-20 2:44 ` joeyli
2012-01-24 0:04 ` [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines joeyli
2 siblings, 1 reply; 29+ messages in thread
From: joeyli @ 2012-01-12 0:21 UTC (permalink / raw)
To: Ike Panhc
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
於 四,2012-01-12 於 00:54 +0800,Ike Panhc 提到:
> On 01/11/2012 12:26 PM, joeyli wrote:
> > 於 一,2012-01-09 於 22:15 +0000,Carlos Corbacho 提到:
> >> On Monday 09 Jan 2012 18:00:24 joeyli wrote:
> >>> I just checked and found I also have no AMW0_GUID2 machines on my hand,
> >>> now.
> >>> I have some questions about AMW0_GUID2:
> >>>
> >>> + Why we enabled wireless capability in acer-wim if a non-acer machine has
> >>> AMW0_GUID2 ?
> >>
> >> IIRC, there were some bug reports on non-Acer hardware (I don't think this
> >> involved Acer hardware, but this was some time ago...) where the wireless
> >> detection wasn't working with this, but if we forced it on, it worked fine.
> >>
> >
> > Yes, in acer-wmi supported some non-acer machine by quirk and read EC
> > register. That means we need find out EC register reflect to wifi RF
> > state if we are lucky.
> >
> > Unfortunately, direct enable wireless capability causes some non-acer
> > machines' wireless rfkill always disabled. e.g. Lenovo E520
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=674353
> >
> > If we don't check the wireless capability, then they need manually add
> > acer-wmi to backlist. On some lenovo machines, ideapad-laptop driver
> > should support by lenovo's ACPI method.
> >
>
> I've got two reports which says after poking the ec register, the phy0 rfkill reports hard blocked by mistake. And few hours ago I get the third report says the similar issue. I will summary the report.
>
Please give more detail information (DSDT, EC register dump...), if
poking the ec register can block rfkill, means the AMW0_GUID1 works on
this machine, maybe we can try to find out which EC register reflect to
wireless.
> I am thinking about alternative way
>
> Since we have thinkpad_acpi and ideapad_laptop, both of them have rfkill capability. If there is VPC2004/IBM0068/LEN0068 in DSDT, then it will be fine if we do not register rfkill in acer-wmi.
>
> Any thought?
>
Yes, it's possible a solution. If you can make sure lenovo machines have
VPC2004/IBM0068/LEN0068 in DSDT, then I will generate a patch to
acer-wmi.
Thanks
Joey Lee
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-12 0:21 ` joeyli
@ 2012-01-25 1:18 ` Ike Panhc
0 siblings, 0 replies; 29+ messages in thread
From: Ike Panhc @ 2012-01-25 1:18 UTC (permalink / raw)
To: joeyli
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
Hi Joey,
sorry for replying late..
For ideapad s205, I work with bug reporter at
http://launchpad.net/bugs/875659
The bug reporter do not attach the DSDT, but I have a copy of acpidump of s205 at
http://people.canonical.com/~ikepanhc/DSDTs/acpidump-ideapad-s205.dat
and I backport this patch to 3.0 kernel and also cherry-pick
acer-wmi: check wireless capability flag before register
and get the report which says the rfkill:phy0 is hard blocked by mistake
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/875659/comments/33
so that I have another kernel built without touching ec register, just dont set ACER_CAP_WIRELESS
and user reports everything looks fine.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/875659/comments/43
For ideapad s12, I work with bug reporter at
http://launchpad.net/bugs/668234
You can find acpi tables at
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/668234/+attachment/1715424/+files/AcpiTables.txt
With patched kernel, rfkill:phy0 is also hard blocked by mistake and it can be unblocked by toggling the hardware radio switch
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/668234/comments/12
Again, I need to confirm its because we touch the ec register, so I ask them to blacklist acer-wmi. User reports it looks fine, but rfkill:phy0 hard blocked after couple of seconds and no idea why.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/668234/comments/16
On 01/12/2012 08:21 AM, joeyli wrote:
> 於 四,2012-01-12 於 00:54 +0800,Ike Panhc 提到:
>> On 01/11/2012 12:26 PM, joeyli wrote:
>>> 於 一,2012-01-09 於 22:15 +0000,Carlos Corbacho 提到:
>>>> On Monday 09 Jan 2012 18:00:24 joeyli wrote:
>>>>> I just checked and found I also have no AMW0_GUID2 machines on my hand,
>>>>> now.
>>>>> I have some questions about AMW0_GUID2:
>>>>>
>>>>> + Why we enabled wireless capability in acer-wim if a non-acer machine has
>>>>> AMW0_GUID2 ?
>>>>
>>>> IIRC, there were some bug reports on non-Acer hardware (I don't think this
>>>> involved Acer hardware, but this was some time ago...) where the wireless
>>>> detection wasn't working with this, but if we forced it on, it worked fine.
>>>>
>>>
>>> Yes, in acer-wmi supported some non-acer machine by quirk and read EC
>>> register. That means we need find out EC register reflect to wifi RF
>>> state if we are lucky.
>>>
>>> Unfortunately, direct enable wireless capability causes some non-acer
>>> machines' wireless rfkill always disabled. e.g. Lenovo E520
>>>
>>> https://bugzilla.redhat.com/show_bug.cgi?id=674353
>>>
>>> If we don't check the wireless capability, then they need manually add
>>> acer-wmi to backlist. On some lenovo machines, ideapad-laptop driver
>>> should support by lenovo's ACPI method.
>>>
>>
>> I've got two reports which says after poking the ec register, the phy0 rfkill reports hard blocked by mistake. And few hours ago I get the third report says the similar issue. I will summary the report.
>>
>
> Please give more detail information (DSDT, EC register dump...), if
> poking the ec register can block rfkill, means the AMW0_GUID1 works on
> this machine, maybe we can try to find out which EC register reflect to
> wireless.
>
>> I am thinking about alternative way
>>
>> Since we have thinkpad_acpi and ideapad_laptop, both of them have rfkill capability. If there is VPC2004/IBM0068/LEN0068 in DSDT, then it will be fine if we do not register rfkill in acer-wmi.
>>
>> Any thought?
>>
>
> Yes, it's possible a solution. If you can make sure lenovo machines have
> VPC2004/IBM0068/LEN0068 in DSDT, then I will generate a patch to
> acer-wmi.
>
>
> Thanks
> Joey Lee
>
>
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-11 16:54 ` Ike Panhc
2012-01-12 0:21 ` joeyli
@ 2012-01-20 2:44 ` joeyli
2012-01-25 1:29 ` Ike Panhc
2012-01-25 1:57 ` [PATCH] acer-wmi: No wifi rfkill on Lenovo machines Ike Panhc
2012-01-24 0:04 ` [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines joeyli
2 siblings, 2 replies; 29+ messages in thread
From: joeyli @ 2012-01-20 2:44 UTC (permalink / raw)
To: Ike Panhc
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
Hi Ike
於 四,2012-01-12 於 00:54 +0800,Ike Panhc 提到:
> On 01/11/2012 12:26 PM, joeyli wrote:
> > 於 一,2012-01-09 於 22:15 +0000,Carlos Corbacho 提到:
> >> On Monday 09 Jan 2012 18:00:24 joeyli wrote:
> >>> I just checked and found I also have no AMW0_GUID2 machines on my hand,
> >>> now.
> >>> I have some questions about AMW0_GUID2:
> >>>
> >>> + Why we enabled wireless capability in acer-wim if a non-acer machine has
> >>> AMW0_GUID2 ?
> >>
> >> IIRC, there were some bug reports on non-Acer hardware (I don't think this
> >> involved Acer hardware, but this was some time ago...) where the wireless
> >> detection wasn't working with this, but if we forced it on, it worked fine.
> >>
> >
> > Yes, in acer-wmi supported some non-acer machine by quirk and read EC
> > register. That means we need find out EC register reflect to wifi RF
> > state if we are lucky.
> >
> > Unfortunately, direct enable wireless capability causes some non-acer
> > machines' wireless rfkill always disabled. e.g. Lenovo E520
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=674353
> >
> > If we don't check the wireless capability, then they need manually add
> > acer-wmi to backlist. On some lenovo machines, ideapad-laptop driver
> > should support by lenovo's ACPI method.
> >
>
> I've got two reports which says after poking the ec register, the phy0 rfkill reports hard blocked by mistake. And few hours ago I get the third report says the similar issue. I will summary the report.
>
Do you mean the above 2 reports is use this patch? or actually it's
other problem?
Could you please kindly test this patch on issue machines?
> I am thinking about alternative way
>
> Since we have thinkpad_acpi and ideapad_laptop, both of them have rfkill capability. If there is VPC2004/IBM0068/LEN0068 in DSDT, then it will be fine if we do not register rfkill in acer-wmi.
>
> Any thought?
>
It's also another idea.
Thanks a lot!
Joey Lee
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-20 2:44 ` joeyli
@ 2012-01-25 1:29 ` Ike Panhc
2012-01-25 1:57 ` [PATCH] acer-wmi: No wifi rfkill on Lenovo machines Ike Panhc
1 sibling, 0 replies; 29+ messages in thread
From: Ike Panhc @ 2012-01-25 1:29 UTC (permalink / raw)
To: joeyli
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
Hi Joey,
On 01/20/2012 10:44 AM, joeyli wrote:
> Hi Ike
>
> 於 四,2012-01-12 於 00:54 +0800,Ike Panhc 提到:
>> On 01/11/2012 12:26 PM, joeyli wrote:
>>> 於 一,2012-01-09 於 22:15 +0000,Carlos Corbacho 提到:
>>>> On Monday 09 Jan 2012 18:00:24 joeyli wrote:
>>>>> I just checked and found I also have no AMW0_GUID2 machines on my hand,
>>>>> now.
>>>>> I have some questions about AMW0_GUID2:
>>>>>
>>>>> + Why we enabled wireless capability in acer-wim if a non-acer machine has
>>>>> AMW0_GUID2 ?
>>>>
>>>> IIRC, there were some bug reports on non-Acer hardware (I don't think this
>>>> involved Acer hardware, but this was some time ago...) where the wireless
>>>> detection wasn't working with this, but if we forced it on, it worked fine.
>>>>
>>>
>>> Yes, in acer-wmi supported some non-acer machine by quirk and read EC
>>> register. That means we need find out EC register reflect to wifi RF
>>> state if we are lucky.
>>>
>>> Unfortunately, direct enable wireless capability causes some non-acer
>>> machines' wireless rfkill always disabled. e.g. Lenovo E520
>>>
>>> https://bugzilla.redhat.com/show_bug.cgi?id=674353
>>>
>>> If we don't check the wireless capability, then they need manually add
>>> acer-wmi to backlist. On some lenovo machines, ideapad-laptop driver
>>> should support by lenovo's ACPI method.
>>>
>>
>> I've got two reports which says after poking the ec register, the phy0 rfkill reports hard blocked by mistake. And few hours ago I get the third report says the similar issue. I will summary the report.
>>
>
> Do you mean the above 2 reports is use this patch? or actually it's
> other problem?
> Could you please kindly test this patch on issue machines?
>
Yes, I ask them to blacklist patched acer-wmi to confirm the problem.
I am afraid that after we change the value of ec register, ec firmware might do something unexpectedly. Since acer-wmi is loaded on lots of machine with different EC, it might cause unexpected and different regression on each machine.
>> I am thinking about alternative way
>>
>> Since we have thinkpad_acpi and ideapad_laptop, both of them have rfkill capability. If there is VPC2004/IBM0068/LEN0068 in DSDT, then it will be fine if we do not register rfkill in acer-wmi.
>>
>> Any thought?
>>
>
> It's also another idea.
>
>
> Thanks a lot!
> Joey Lee
>
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH] acer-wmi: No wifi rfkill on Lenovo machines
2012-01-20 2:44 ` joeyli
2012-01-25 1:29 ` Ike Panhc
@ 2012-01-25 1:57 ` Ike Panhc
2012-01-25 2:14 ` Ike Panhc
1 sibling, 1 reply; 29+ messages in thread
From: Ike Panhc @ 2012-01-25 1:57 UTC (permalink / raw)
To: joeyli
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
We have several reports which says acer-wmi is loaded on ideapads
and register rfkill for wifi which can not be unblocked.
Since ideapad-laptop also register rfkill for wifi and it works
reliably, it will be fine acer-wmi is not going to register rfkill
for wifi once VPC2004 is found.
Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
wifi rfkill capability, there are reports which says acer-wmi also
block wireless on Thinkpad E520/E420.
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
drivers/platform/x86/acer-wmi.c | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index b848277..aaef8f8 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
return AE_OK;
}
+static int AMW0_set_cap_acpi_check_device_found = 0;
+
+static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
+ u32 level, void *context, void **retval)
+{
+ AMW0_set_cap_acpi_check_device_found = 1;
+ return AE_OK;
+}
+
+static const struct acpi_device_id norfkill_ids[] = {
+ { "VPC2004", 0},
+ { "IBM0068", 0},
+ { "LEN0068", 0},
+ { "", 0},
+};
+
+static int AMW0_set_cap_acpi_check_device(void)
+{
+ const struct acpi_device_id *id;
+
+ for (id = norfkill_ids; id->id[0]; id++)
+ acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
+ NULL, NULL);
+ return AMW0_set_cap_acpi_check_device_found;
+}
+
static acpi_status AMW0_set_capabilities(void)
{
struct wmab_args args;
@@ -692,7 +718,8 @@ static acpi_status AMW0_set_capabilities(void)
* work.
*/
if (wmi_has_guid(AMW0_GUID2)) {
- interface->capability |= ACER_CAP_WIRELESS;
+ if (!AMW0_set_cap_acpi_check_device())
+ interface->capability |= ACER_CAP_WIRELESS;
return AE_OK;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH] acer-wmi: No wifi rfkill on Lenovo machines
2012-01-25 1:57 ` [PATCH] acer-wmi: No wifi rfkill on Lenovo machines Ike Panhc
@ 2012-01-25 2:14 ` Ike Panhc
2012-01-26 2:53 ` joeyli
0 siblings, 1 reply; 29+ messages in thread
From: Ike Panhc @ 2012-01-25 2:14 UTC (permalink / raw)
To: joeyli
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
This patch has been tested on ideapad s205
User reports the first time try wireless hard/soft all blocked
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/875659/comments/53
but the second try looks good.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/875659/comments/55
On 01/25/2012 09:57 AM, Ike Panhc wrote:
> We have several reports which says acer-wmi is loaded on ideapads
> and register rfkill for wifi which can not be unblocked.
>
> Since ideapad-laptop also register rfkill for wifi and it works
> reliably, it will be fine acer-wmi is not going to register rfkill
> for wifi once VPC2004 is found.
>
> Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
> wifi rfkill capability, there are reports which says acer-wmi also
> block wireless on Thinkpad E520/E420.
>
> Signed-off-by: Ike Panhc <ike.pan@canonical.com>
> ---
> drivers/platform/x86/acer-wmi.c | 29 ++++++++++++++++++++++++++++-
> 1 files changed, 28 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
> index b848277..aaef8f8 100644
> --- a/drivers/platform/x86/acer-wmi.c
> +++ b/drivers/platform/x86/acer-wmi.c
> @@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
> return AE_OK;
> }
>
> +static int AMW0_set_cap_acpi_check_device_found = 0;
> +
> +static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
> + u32 level, void *context, void **retval)
> +{
> + AMW0_set_cap_acpi_check_device_found = 1;
> + return AE_OK;
> +}
> +
> +static const struct acpi_device_id norfkill_ids[] = {
> + { "VPC2004", 0},
> + { "IBM0068", 0},
> + { "LEN0068", 0},
> + { "", 0},
> +};
> +
> +static int AMW0_set_cap_acpi_check_device(void)
> +{
> + const struct acpi_device_id *id;
> +
> + for (id = norfkill_ids; id->id[0]; id++)
> + acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
> + NULL, NULL);
> + return AMW0_set_cap_acpi_check_device_found;
> +}
> +
> static acpi_status AMW0_set_capabilities(void)
> {
> struct wmab_args args;
> @@ -692,7 +718,8 @@ static acpi_status AMW0_set_capabilities(void)
> * work.
> */
> if (wmi_has_guid(AMW0_GUID2)) {
> - interface->capability |= ACER_CAP_WIRELESS;
> + if (!AMW0_set_cap_acpi_check_device())
> + interface->capability |= ACER_CAP_WIRELESS;
> return AE_OK;
> }
>
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH] acer-wmi: No wifi rfkill on Lenovo machines
2012-01-25 2:14 ` Ike Panhc
@ 2012-01-26 2:53 ` joeyli
2012-02-03 8:46 ` [PATCH v2] " Ike Panhc
0 siblings, 1 reply; 29+ messages in thread
From: joeyli @ 2012-01-26 2:53 UTC (permalink / raw)
To: Ike Panhc
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
Hi Ike,
於 三,2012-01-25 於 10:14 +0800,Ike Panhc 提到:
> This patch has been tested on ideapad s205
>
> User reports the first time try wireless hard/soft all blocked
>
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/875659/comments/53
>
> but the second try looks good.
>
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/875659/comments/55
>
>
That will be better retest this patch after remove ac power and battery.
> On 01/25/2012 09:57 AM, Ike Panhc wrote:
> > We have several reports which says acer-wmi is loaded on ideapads
> > and register rfkill for wifi which can not be unblocked.
> >
> > Since ideapad-laptop also register rfkill for wifi and it works
> > reliably, it will be fine acer-wmi is not going to register rfkill
> > for wifi once VPC2004 is found.
> >
> > Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
> > wifi rfkill capability, there are reports which says acer-wmi also
> > block wireless on Thinkpad E520/E420.
> >
> > Signed-off-by: Ike Panhc <ike.pan@canonical.com>
> > ---
> > drivers/platform/x86/acer-wmi.c | 29 ++++++++++++++++++++++++++++-
> > 1 files changed, 28 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
> > index b848277..aaef8f8 100644
> > --- a/drivers/platform/x86/acer-wmi.c
> > +++ b/drivers/platform/x86/acer-wmi.c
> > @@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
> > return AE_OK;
> > }
> >
> > +static int AMW0_set_cap_acpi_check_device_found = 0;
> > +
> > +static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
> > + u32 level, void *context, void **retval)
> > +{
> > + AMW0_set_cap_acpi_check_device_found = 1;
> > + return AE_OK;
> > +}
> > +
> > +static const struct acpi_device_id norfkill_ids[] = {
> > + { "VPC2004", 0},
> > + { "IBM0068", 0},
> > + { "LEN0068", 0},
> > + { "", 0},
> > +};
> > +
> > +static int AMW0_set_cap_acpi_check_device(void)
> > +{
> > + const struct acpi_device_id *id;
> > +
> > + for (id = norfkill_ids; id->id[0]; id++)
> > + acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
> > + NULL, NULL);
> > + return AMW0_set_cap_acpi_check_device_found;
> > +}
> > +
> > static acpi_status AMW0_set_capabilities(void)
> > {
> > struct wmab_args args;
> > @@ -692,7 +718,8 @@ static acpi_status AMW0_set_capabilities(void)
> > * work.
> > */
> > if (wmi_has_guid(AMW0_GUID2)) {
> > - interface->capability |= ACER_CAP_WIRELESS;
> > + if (!AMW0_set_cap_acpi_check_device())
> > + interface->capability |= ACER_CAP_WIRELESS;
I suggest add the following logic (non-test) to pass quirks that were
already supported by acer-wmi:
if ((quirk != &quirk_unknown) || !AMW0_set_cap_acpi_check_device())
interface->capability |= ACER_CAP_WIRELESS;
That can keep acer-wmi still support Lenovo Ideapad S205 and Lenovo 3000 N200 by
quirks. Those quirks works fine before.
> > return AE_OK;
> > }
> >
>
>
Thanks a lot!
Joey Lee
^ permalink raw reply [flat|nested] 29+ messages in thread* [PATCH v2] acer-wmi: No wifi rfkill on Lenovo machines
2012-01-26 2:53 ` joeyli
@ 2012-02-03 8:46 ` Ike Panhc
2012-02-03 8:55 ` Ike Panhc
` (3 more replies)
0 siblings, 4 replies; 29+ messages in thread
From: Ike Panhc @ 2012-02-03 8:46 UTC (permalink / raw)
To: joeyli
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
We have several reports which says acer-wmi is loaded on ideapads
and register rfkill for wifi which can not be unblocked.
Since ideapad-laptop also register rfkill for wifi and it works
reliably, it will be fine acer-wmi is not going to register rfkill
for wifi once VPC2004 is found.
Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
wifi rfkill capability, there are reports which says acer-wmi also
block wireless on Thinkpad E520/E420.
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
drivers/platform/x86/acer-wmi.c | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index b848277..1e5290b 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
return AE_OK;
}
+static int AMW0_set_cap_acpi_check_device_found;
+
+static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
+ u32 level, void *context, void **retval)
+{
+ AMW0_set_cap_acpi_check_device_found = 1;
+ return AE_OK;
+}
+
+static const struct acpi_device_id norfkill_ids[] = {
+ { "VPC2004", 0},
+ { "IBM0068", 0},
+ { "LEN0068", 0},
+ { "", 0},
+};
+
+static int AMW0_set_cap_acpi_check_device(void)
+{
+ const struct acpi_device_id *id;
+
+ for (id = norfkill_ids; id->id[0]; id++)
+ acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
+ NULL, NULL);
+ return AMW0_set_cap_acpi_check_device_found;
+}
+
static acpi_status AMW0_set_capabilities(void)
{
struct wmab_args args;
@@ -692,7 +718,9 @@ static acpi_status AMW0_set_capabilities(void)
* work.
*/
if (wmi_has_guid(AMW0_GUID2)) {
- interface->capability |= ACER_CAP_WIRELESS;
+ if ((quirks != &quirk_unknown) ||
+ !AMW0_set_cap_acpi_check_device())
+ interface->capability |= ACER_CAP_WIRELESS;
return AE_OK;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH v2] acer-wmi: No wifi rfkill on Lenovo machines
2012-02-03 8:46 ` [PATCH v2] " Ike Panhc
@ 2012-02-03 8:55 ` Ike Panhc
2012-02-06 9:55 ` joeyli
` (2 subsequent siblings)
3 siblings, 0 replies; 29+ messages in thread
From: Ike Panhc @ 2012-02-03 8:55 UTC (permalink / raw)
To: joeyli
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
Two modification.
* Check quirks also.
* for static variable, no need to set to 0 as initial value.
On 02/03/2012 04:46 PM, Ike Panhc wrote:
> We have several reports which says acer-wmi is loaded on ideapads
> and register rfkill for wifi which can not be unblocked.
>
> Since ideapad-laptop also register rfkill for wifi and it works
> reliably, it will be fine acer-wmi is not going to register rfkill
> for wifi once VPC2004 is found.
>
> Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
> wifi rfkill capability, there are reports which says acer-wmi also
> block wireless on Thinkpad E520/E420.
>
> Signed-off-by: Ike Panhc <ike.pan@canonical.com>
> ---
> drivers/platform/x86/acer-wmi.c | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
> index b848277..1e5290b 100644
> --- a/drivers/platform/x86/acer-wmi.c
> +++ b/drivers/platform/x86/acer-wmi.c
> @@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
> return AE_OK;
> }
>
> +static int AMW0_set_cap_acpi_check_device_found;
> +
> +static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
> + u32 level, void *context, void **retval)
> +{
> + AMW0_set_cap_acpi_check_device_found = 1;
> + return AE_OK;
> +}
> +
> +static const struct acpi_device_id norfkill_ids[] = {
> + { "VPC2004", 0},
> + { "IBM0068", 0},
> + { "LEN0068", 0},
> + { "", 0},
> +};
> +
> +static int AMW0_set_cap_acpi_check_device(void)
> +{
> + const struct acpi_device_id *id;
> +
> + for (id = norfkill_ids; id->id[0]; id++)
> + acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
> + NULL, NULL);
> + return AMW0_set_cap_acpi_check_device_found;
> +}
> +
> static acpi_status AMW0_set_capabilities(void)
> {
> struct wmab_args args;
> @@ -692,7 +718,9 @@ static acpi_status AMW0_set_capabilities(void)
> * work.
> */
> if (wmi_has_guid(AMW0_GUID2)) {
> - interface->capability |= ACER_CAP_WIRELESS;
> + if ((quirks != &quirk_unknown) ||
> + !AMW0_set_cap_acpi_check_device())
> + interface->capability |= ACER_CAP_WIRELESS;
> return AE_OK;
> }
>
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH v2] acer-wmi: No wifi rfkill on Lenovo machines
2012-02-03 8:46 ` [PATCH v2] " Ike Panhc
2012-02-03 8:55 ` Ike Panhc
@ 2012-02-06 9:55 ` joeyli
2012-02-11 19:10 ` Jonathan Nieder
2012-03-14 21:53 ` [PATCH 3.0.y] " Jonathan Nieder
3 siblings, 0 replies; 29+ messages in thread
From: joeyli @ 2012-02-06 9:55 UTC (permalink / raw)
To: Ike Panhc
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
Hi Ike,
於 五,2012-02-03 於 16:46 +0800,Ike Panhc 提到:
> We have several reports which says acer-wmi is loaded on ideapads
> and register rfkill for wifi which can not be unblocked.
>
> Since ideapad-laptop also register rfkill for wifi and it works
> reliably, it will be fine acer-wmi is not going to register rfkill
> for wifi once VPC2004 is found.
>
> Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
> wifi rfkill capability, there are reports which says acer-wmi also
> block wireless on Thinkpad E520/E420.
>
> Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Thanks for your patch, it's good to me after tested.
Tested on Acer TravelMate 4750.
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Thanks a lot!
Joey Lee
> ---
> drivers/platform/x86/acer-wmi.c | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
> index b848277..1e5290b 100644
> --- a/drivers/platform/x86/acer-wmi.c
> +++ b/drivers/platform/x86/acer-wmi.c
> @@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
> return AE_OK;
> }
>
> +static int AMW0_set_cap_acpi_check_device_found;
> +
> +static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
> + u32 level, void *context, void **retval)
> +{
> + AMW0_set_cap_acpi_check_device_found = 1;
> + return AE_OK;
> +}
> +
> +static const struct acpi_device_id norfkill_ids[] = {
> + { "VPC2004", 0},
> + { "IBM0068", 0},
> + { "LEN0068", 0},
> + { "", 0},
> +};
> +
> +static int AMW0_set_cap_acpi_check_device(void)
> +{
> + const struct acpi_device_id *id;
> +
> + for (id = norfkill_ids; id->id[0]; id++)
> + acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
> + NULL, NULL);
> + return AMW0_set_cap_acpi_check_device_found;
> +}
> +
> static acpi_status AMW0_set_capabilities(void)
> {
> struct wmab_args args;
> @@ -692,7 +718,9 @@ static acpi_status AMW0_set_capabilities(void)
> * work.
> */
> if (wmi_has_guid(AMW0_GUID2)) {
> - interface->capability |= ACER_CAP_WIRELESS;
> + if ((quirks != &quirk_unknown) ||
> + !AMW0_set_cap_acpi_check_device())
> + interface->capability |= ACER_CAP_WIRELESS;
> return AE_OK;
> }
>
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH v2] acer-wmi: No wifi rfkill on Lenovo machines
2012-02-03 8:46 ` [PATCH v2] " Ike Panhc
2012-02-03 8:55 ` Ike Panhc
2012-02-06 9:55 ` joeyli
@ 2012-02-11 19:10 ` Jonathan Nieder
2012-02-21 9:22 ` [PATCH resend] " Jonathan Nieder
2012-03-14 21:53 ` [PATCH 3.0.y] " Jonathan Nieder
3 siblings, 1 reply; 29+ messages in thread
From: Jonathan Nieder @ 2012-02-11 19:10 UTC (permalink / raw)
To: Ike Panhc
Cc: joeyli, Carlos Corbacho, mjg, platform-driver-x86,
Dmitry Torokhov, Corentin Chary, Thomas Renninger, Seth Forshee,
Andrey
Hi,
Ike Panhc wrote:
> We have several reports which says acer-wmi is loaded on ideapads
> and register rfkill for wifi which can not be unblocked.
>
> Since ideapad-laptop also register rfkill for wifi and it works
> reliably, it will be fine acer-wmi is not going to register rfkill
> for wifi once VPC2004 is found.
[...]
> Signed-off-by: Ike Panhc <ike.pan@canonical.com>
> ---
> drivers/platform/x86/acer-wmi.c | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
Thanks! As described at <http://bugs.debian.org/655941>, without this
patch, Andrey was not able to use wifi, getting the following message
in the kernel log instead:
iwlagn 0000:03:00.0: RF_KILL bit toggled to enable radio.
rfkill list gave
2: acer-wireless: Wireless LAN
Soft blocked: yes
Hard blocked: no
regardless of the state of the actual radio kill switch. Unloading
the acer_wmi was a workaround. With this patch, wifi works without
needing to unload acer_wmi, so:
Tested-by: Andrey <andrey.k.p@gmail.com> # Ideapad Z570
He tested against the 3.2.y tree.
When applying this, please consider cc-ing stable@ so people using
point releases can benefit from the fix, too.
Happily,
Jonathan
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH resend] acer-wmi: No wifi rfkill on Lenovo machines
2012-02-11 19:10 ` Jonathan Nieder
@ 2012-02-21 9:22 ` Jonathan Nieder
0 siblings, 0 replies; 29+ messages in thread
From: Jonathan Nieder @ 2012-02-21 9:22 UTC (permalink / raw)
Cc: Ike Panhc, joeyli, Carlos Corbacho, mjg, platform-driver-x86,
Dmitry Torokhov, Corentin Chary, Thomas Renninger, Seth Forshee,
Andrey, Andrew Morton
From: Ike Panhc <ike.pan@canonical.com>
Date: Fri, 3 Feb 2012 16:46:39 +0800
We have several reports which says acer-wmi is loaded on ideapads
and register rfkill for wifi which can not be unblocked.
Since ideapad-laptop also register rfkill for wifi and it works
reliably, it will be fine acer-wmi is not going to register rfkill
for wifi once VPC2004 is found.
Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
wifi rfkill capability, there are reports which says acer-wmi also
block wireless on Thinkpad E520/E420.
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Acked-by: Lee, Chun-Yi <jlee@suse.com>
Tested-by: Andrey <andrey.k.p@gmail.com> # Ideapad Z570
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Cc: stable@vger.kernel.org
---
Hi Matthew,
Here's a patch that seems to have fallen through the cracks. Symptom
is that wifi just doesn't work on these machines until the acer-wmi
driver is unloaded. Acked by the acer-wmi maintainer (jlee). The
patch doesn't seem to be present in linux-next. Bug was present in
3.1.8, possibly on some older kernels, too.
References:
http://bugs.debian.org/655941
https://bugzilla.redhat.com/show_bug.cgi?id=674353
Anything interested people can do to move this forward?
Jonathan
drivers/platform/x86/acer-wmi.c | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index b848277171a4..1e5290b5396d 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
return AE_OK;
}
+static int AMW0_set_cap_acpi_check_device_found;
+
+static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
+ u32 level, void *context, void **retval)
+{
+ AMW0_set_cap_acpi_check_device_found = 1;
+ return AE_OK;
+}
+
+static const struct acpi_device_id norfkill_ids[] = {
+ { "VPC2004", 0},
+ { "IBM0068", 0},
+ { "LEN0068", 0},
+ { "", 0},
+};
+
+static int AMW0_set_cap_acpi_check_device(void)
+{
+ const struct acpi_device_id *id;
+
+ for (id = norfkill_ids; id->id[0]; id++)
+ acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
+ NULL, NULL);
+ return AMW0_set_cap_acpi_check_device_found;
+}
+
static acpi_status AMW0_set_capabilities(void)
{
struct wmab_args args;
@@ -692,7 +718,9 @@ static acpi_status AMW0_set_capabilities(void)
* work.
*/
if (wmi_has_guid(AMW0_GUID2)) {
- interface->capability |= ACER_CAP_WIRELESS;
+ if ((quirks != &quirk_unknown) ||
+ !AMW0_set_cap_acpi_check_device())
+ interface->capability |= ACER_CAP_WIRELESS;
return AE_OK;
}
--
1.7.9
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-02-03 8:46 ` [PATCH v2] " Ike Panhc
` (2 preceding siblings ...)
2012-02-11 19:10 ` Jonathan Nieder
@ 2012-03-14 21:53 ` Jonathan Nieder
2012-03-14 22:02 ` Greg KH
3 siblings, 1 reply; 29+ messages in thread
From: Jonathan Nieder @ 2012-03-14 21:53 UTC (permalink / raw)
To: stable
Cc: Ike Panhc, joeyli, Carlos Corbacho, mjg, platform-driver-x86,
Dmitry Torokhov, Corentin Chary, Thomas Renninger, Andrey
Hi Greg,
Please consider applying 461e74377cfc (acer-wmi: No wifi rfkill on
Lenovo machines, 2012-02-03) to the 3.2.y and 3.0.y trees.
Ike Panhc wrote:
> We have several reports which says acer-wmi is loaded on ideapads
> and register rfkill for wifi which can not be unblocked.
>
> Since ideapad-laptop also register rfkill for wifi and it works
> reliably, it will be fine acer-wmi is not going to register rfkill
> for wifi once VPC2004 is found.
>
> Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
> wifi rfkill capability, there are reports which says acer-wmi also
> block wireless on Thinkpad E520/E420.
>
> Signed-off-by: Ike Panhc <ike.pan@canonical.com>
The symptom was that that wifi just doesn't work on these machines
until the acer-wmi driver is unloaded. Bug was present in
3.1.8 and Ubuntu's 3.0.0-12, possibly on some older kernels, too.
Andrey (cc-ed) confirmed that applying the patch against 3.2.y gets
wifi working again on his Ideapad Z570, so
Tested-by: Andrey <andrey.k.p@gmail.com> # Ideapad Z570
References:
http://bugs.debian.org/655941
http://launchpad.net/bugs/875659
https://bugzilla.redhat.com/show_bug.cgi?id=674353
Patch left unsnipped for reference.
Thanks,
Jonathan
> ---
> drivers/platform/x86/acer-wmi.c | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
> index b848277..1e5290b 100644
> --- a/drivers/platform/x86/acer-wmi.c
> +++ b/drivers/platform/x86/acer-wmi.c
> @@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
> return AE_OK;
> }
>
> +static int AMW0_set_cap_acpi_check_device_found;
> +
> +static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
> + u32 level, void *context, void **retval)
> +{
> + AMW0_set_cap_acpi_check_device_found = 1;
> + return AE_OK;
> +}
> +
> +static const struct acpi_device_id norfkill_ids[] = {
> + { "VPC2004", 0},
> + { "IBM0068", 0},
> + { "LEN0068", 0},
> + { "", 0},
> +};
> +
> +static int AMW0_set_cap_acpi_check_device(void)
> +{
> + const struct acpi_device_id *id;
> +
> + for (id = norfkill_ids; id->id[0]; id++)
> + acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
> + NULL, NULL);
> + return AMW0_set_cap_acpi_check_device_found;
> +}
> +
> static acpi_status AMW0_set_capabilities(void)
> {
> struct wmab_args args;
> @@ -692,7 +718,9 @@ static acpi_status AMW0_set_capabilities(void)
> * work.
> */
> if (wmi_has_guid(AMW0_GUID2)) {
> - interface->capability |= ACER_CAP_WIRELESS;
> + if ((quirks != &quirk_unknown) ||
> + !AMW0_set_cap_acpi_check_device())
> + interface->capability |= ACER_CAP_WIRELESS;
> return AE_OK;
> }
>
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-03-14 21:53 ` [PATCH 3.0.y] " Jonathan Nieder
@ 2012-03-14 22:02 ` Greg KH
2012-03-14 22:17 ` Jonathan Nieder
0 siblings, 1 reply; 29+ messages in thread
From: Greg KH @ 2012-03-14 22:02 UTC (permalink / raw)
To: Jonathan Nieder
Cc: stable, Ike Panhc, joeyli, Carlos Corbacho, mjg,
platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger, Andrey
On Wed, Mar 14, 2012 at 04:53:27PM -0500, Jonathan Nieder wrote:
> Hi Greg,
>
> Please consider applying 461e74377cfc (acer-wmi: No wifi rfkill on
> Lenovo machines, 2012-02-03) to the 3.2.y and 3.0.y trees.
Now applied.
greg k-h
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-03-14 22:02 ` Greg KH
@ 2012-03-14 22:17 ` Jonathan Nieder
2012-03-16 4:03 ` Ike Panhc
0 siblings, 1 reply; 29+ messages in thread
From: Jonathan Nieder @ 2012-03-14 22:17 UTC (permalink / raw)
To: Greg KH
Cc: stable, Ike Panhc, joeyli, Carlos Corbacho, mjg,
platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger, Andrey
Greg KH wrote:
> On Wed, Mar 14, 2012 at 04:53:27PM -0500, Jonathan Nieder wrote:
>> Please consider applying 461e74377cfc (acer-wmi: No wifi rfkill on
>> Lenovo machines, 2012-02-03) to the 3.2.y and 3.0.y trees.
>
> Now applied.
Thanks! That was fast.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-03-14 22:17 ` Jonathan Nieder
@ 2012-03-16 4:03 ` Ike Panhc
2012-03-16 6:11 ` joeyli
0 siblings, 1 reply; 29+ messages in thread
From: Ike Panhc @ 2012-03-16 4:03 UTC (permalink / raw)
To: Greg KH, joeyli
Cc: Jonathan Nieder, stable, Carlos Corbacho, mjg,
platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger, Andrey
On 03/15/2012 06:17 AM, Jonathan Nieder wrote:
> Greg KH wrote:
>> On Wed, Mar 14, 2012 at 04:53:27PM -0500, Jonathan Nieder wrote:
>
>>> Please consider applying 461e74377cfc (acer-wmi: No wifi rfkill on
>>> Lenovo machines, 2012-02-03) to the 3.2.y and 3.0.y trees.
>>
>> Now applied.
>
> Thanks! That was fast.
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Review the commit log of acer-wmi
For 3.2.y, this patch shall work fine.
But for 3.0.y, backport commit 1709adab is necessary or patch has no effect.
I will post the backport patch after.
Joey, can you review and ACK/NAK for this?
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-03-16 4:03 ` Ike Panhc
@ 2012-03-16 6:11 ` joeyli
2012-03-16 17:20 ` Greg KH
0 siblings, 1 reply; 29+ messages in thread
From: joeyli @ 2012-03-16 6:11 UTC (permalink / raw)
To: Ike Panhc
Cc: Greg KH, Jonathan Nieder, stable, Carlos Corbacho, mjg,
platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger, Andrey
Hi Ike,
於 五,2012-03-16 於 12:03 +0800,Ike Panhc 提到:
> On 03/15/2012 06:17 AM, Jonathan Nieder wrote:
> > Greg KH wrote:
> >> On Wed, Mar 14, 2012 at 04:53:27PM -0500, Jonathan Nieder wrote:
> >
> >>> Please consider applying 461e74377cfc (acer-wmi: No wifi rfkill on
> >>> Lenovo machines, 2012-02-03) to the 3.2.y and 3.0.y trees.
> >>
> >> Now applied.
> >
> > Thanks! That was fast.
> > --
> > To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
> Review the commit log of acer-wmi
>
> For 3.2.y, this patch shall work fine.
>
> But for 3.0.y, backport commit 1709adab is necessary or patch has no effect.
>
> I will post the backport patch after.
>
> Joey, can you review and ACK/NAK for this?
>
Yes, should check ACER_CAP_WIRELESS flag before create wifi rfkill
interface.
Thanks
Joey Lee
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-03-16 6:11 ` joeyli
@ 2012-03-16 17:20 ` Greg KH
2012-03-19 2:08 ` joeyli
0 siblings, 1 reply; 29+ messages in thread
From: Greg KH @ 2012-03-16 17:20 UTC (permalink / raw)
To: joeyli
Cc: Ike Panhc, Jonathan Nieder, stable, Carlos Corbacho, mjg,
platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger, Andrey
On Fri, Mar 16, 2012 at 02:11:21PM +0800, joeyli wrote:
> Hi Ike,
>
> 於 五,2012-03-16 於 12:03 +0800,Ike Panhc 提到:
> > On 03/15/2012 06:17 AM, Jonathan Nieder wrote:
> > > Greg KH wrote:
> > >> On Wed, Mar 14, 2012 at 04:53:27PM -0500, Jonathan Nieder wrote:
> > >
> > >>> Please consider applying 461e74377cfc (acer-wmi: No wifi rfkill on
> > >>> Lenovo machines, 2012-02-03) to the 3.2.y and 3.0.y trees.
> > >>
> > >> Now applied.
> > >
> > > Thanks! That was fast.
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > >
> >
> > Review the commit log of acer-wmi
> >
> > For 3.2.y, this patch shall work fine.
> >
> > But for 3.0.y, backport commit 1709adab is necessary or patch has no effect.
> >
> > I will post the backport patch after.
> >
> > Joey, can you review and ACK/NAK for this?
> >
>
> Yes, should check ACER_CAP_WIRELESS flag before create wifi rfkill
> interface.
Ok, I've queued up a number of acer-wmi patches for the 3.0-stable tree
now, all should be good.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-03-16 17:20 ` Greg KH
@ 2012-03-19 2:08 ` joeyli
2012-03-19 12:40 ` Andrey
0 siblings, 1 reply; 29+ messages in thread
From: joeyli @ 2012-03-19 2:08 UTC (permalink / raw)
To: Greg KH
Cc: Ike Panhc, Jonathan Nieder, stable, Carlos Corbacho, mjg,
platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger, Andrey
於 五,2012-03-16 於 10:20 -0700,Greg KH 提到:
> On Fri, Mar 16, 2012 at 02:11:21PM +0800, joeyli wrote:
> > Hi Ike,
> >
> > 於 五,2012-03-16 於 12:03 +0800,Ike Panhc 提到:
> > > On 03/15/2012 06:17 AM, Jonathan Nieder wrote:
> > > > Greg KH wrote:
> > > >> On Wed, Mar 14, 2012 at 04:53:27PM -0500, Jonathan Nieder wrote:
> > > >
> > > >>> Please consider applying 461e74377cfc (acer-wmi: No wifi rfkill on
> > > >>> Lenovo machines, 2012-02-03) to the 3.2.y and 3.0.y trees.
> > > >>
> > > >> Now applied.
> > > >
> > > > Thanks! That was fast.
> > > > --
> > > > To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> > > > the body of a message to majordomo@vger.kernel.org
> > > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > >
> > >
> > > Review the commit log of acer-wmi
> > >
> > > For 3.2.y, this patch shall work fine.
> > >
> > > But for 3.0.y, backport commit 1709adab is necessary or patch has no effect.
> > >
> > > I will post the backport patch after.
> > >
> > > Joey, can you review and ACK/NAK for this?
> > >
> >
> > Yes, should check ACER_CAP_WIRELESS flag before create wifi rfkill
> > interface.
>
> Ok, I've queued up a number of acer-wmi patches for the 3.0-stable tree
> now, all should be good.
>
> thanks,
>
> greg k-h
>
Thanks a lot!
Joey Lee
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-03-19 2:08 ` joeyli
@ 2012-03-19 12:40 ` Andrey
2012-03-19 14:48 ` Jonathan Nieder
0 siblings, 1 reply; 29+ messages in thread
From: Andrey @ 2012-03-19 12:40 UTC (permalink / raw)
To: joeyli
Cc: Greg KH, Ike Panhc, Jonathan Nieder, stable, Carlos Corbacho, mjg,
platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
19.03.2012 04:08, joeyli пишет:
> 於 五,2012-03-16 於 10:20 -0700,Greg KH 提到:
>> On Fri, Mar 16, 2012 at 02:11:21PM +0800, joeyli wrote:
>>> Hi Ike,
>>>
>>> 於 五,2012-03-16 於 12:03 +0800,Ike Panhc 提到:
>>>> On 03/15/2012 06:17 AM, Jonathan Nieder wrote:
>>>>> Greg KH wrote:
>>>>>> On Wed, Mar 14, 2012 at 04:53:27PM -0500, Jonathan Nieder wrote:
>>>>>
>>>>>>> Please consider applying 461e74377cfc (acer-wmi: No wifi rfkill on
>>>>>>> Lenovo machines, 2012-02-03) to the 3.2.y and 3.0.y trees.
>>>>>>
>>>>>> Now applied.
>>>>>
>>>>> Thanks! That was fast.
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>>>
>>>>
>>>> Review the commit log of acer-wmi
>>>>
>>>> For 3.2.y, this patch shall work fine.
>>>>
>>>> But for 3.0.y, backport commit 1709adab is necessary or patch has no effect.
>>>>
>>>> I will post the backport patch after.
>>>>
>>>> Joey, can you review and ACK/NAK for this?
>>>>
>>>
>>> Yes, should check ACER_CAP_WIRELESS flag before create wifi rfkill
>>> interface.
>>
>> Ok, I've queued up a number of acer-wmi patches for the 3.0-stable tree
>> now, all should be good.
>>
>> thanks,
>>
>> greg k-h
>>
>
> Thanks a lot!
> Joey Lee
>
>
>
Please notify me when patches will be present in git. For testing.
Thanks!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPZylEAAoJEFy4/nEE4cHctr8H/31WX6TyfdfdKdft9oxSvCh3
1kYvxMY5rNgPDV7n19Hu280AZt4mLjbDupfGqewiArxEfiPFQqSs/1wUBM7Rl70E
eniJ+mTz7v2UuA7j+wdnp0LTR41qkmVd8tlLMjLnj+/UqxJyFo+8dyPFpAF3lTZS
jthIMqFJoWv+1/4pvcBFCXeQiQDHMMHFQuqT5qGhsjxuDDCDQ4S2PnYuwcZCPYwY
yTlDCUIhePOBekwU0MAmbtcskz7zByek+Q+xS6a6KV2ZJ4H3h1pO+WqGtsqsbkrj
Xyx/Ng6B0nYSQhsqMZZC7VyqetgXUMBb2ZL/W17dAOXsXbelmpyAtrszRZlXRV4=
=nXjU
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3.0.y] acer-wmi: No wifi rfkill on Lenovo machines
2012-03-19 12:40 ` Andrey
@ 2012-03-19 14:48 ` Jonathan Nieder
0 siblings, 0 replies; 29+ messages in thread
From: Jonathan Nieder @ 2012-03-19 14:48 UTC (permalink / raw)
To: Andrey
Cc: joeyli, Greg KH, Ike Panhc, stable, Carlos Corbacho, mjg,
platform-driver-x86, Dmitry Torokhov, Corentin Chary,
Thomas Renninger
Hi Andrey,
Andrey wrote:
>> 於 五,2012-03-16 於 10:20 -0700,Greg KH 提到:
>>> Ok, I've queued up a number of acer-wmi patches for the 3.0-stable tree
>>> now, all should be good.
[...]
> Please notify me when patches will be present in git. For testing.
> Thanks!
The patches can be found in the git repository here:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git
in the queue-3.0 subdirectory so you are free to test them today. ;-)
When Greg announces the next release of the 3.0.y kernel, they will
also be available from the linux-3.0.y branch of
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
assuming nobody has found problems with the patches by then.
Hope that helps,
Jonathan
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
2012-01-11 16:54 ` Ike Panhc
2012-01-12 0:21 ` joeyli
2012-01-20 2:44 ` joeyli
@ 2012-01-24 0:04 ` joeyli
2 siblings, 0 replies; 29+ messages in thread
From: joeyli @ 2012-01-24 0:04 UTC (permalink / raw)
To: Ike Panhc
Cc: Carlos Corbacho, mjg, platform-driver-x86, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
Hi Ike,
On Thu, 2012-01-12 at 00:54 +0800, Ike Panhc wrote:
> On 01/11/2012 12:26 PM, joeyli wrote:
> > 於 一,2012-01-09 於 22:15 +0000,Carlos Corbacho 提到:
> >> On Monday 09 Jan 2012 18:00:24 joeyli wrote:
> >>> I just checked and found I also have no AMW0_GUID2 machines on my hand,
> >>> now.
> >>> I have some questions about AMW0_GUID2:
> >>>
> >>> + Why we enabled wireless capability in acer-wim if a non-acer machine has
> >>> AMW0_GUID2 ?
> >>
> >> IIRC, there were some bug reports on non-Acer hardware (I don't think this
> >> involved Acer hardware, but this was some time ago...) where the wireless
> >> detection wasn't working with this, but if we forced it on, it worked fine.
> >>
> >
> > Yes, in acer-wmi supported some non-acer machine by quirk and read EC
> > register. That means we need find out EC register reflect to wifi RF
> > state if we are lucky.
> >
> > Unfortunately, direct enable wireless capability causes some non-acer
> > machines' wireless rfkill always disabled. e.g. Lenovo E520
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=674353
> >
> > If we don't check the wireless capability, then they need manually add
> > acer-wmi to backlist. On some lenovo machines, ideapad-laptop driver
> > should support by lenovo's ACPI method.
> >
>
> I've got two reports which says after poking the ec register, the phy0 rfkill reports hard blocked by mistake. And few hours ago I get the third report says the similar issue. I will summary the report.
>
Could you please share the above 3 reports and acpidump?
Thanks
Joey Lee
> I am thinking about alternative way
>
> Since we have thinkpad_acpi and ideapad_laptop, both of them have rfkill capability. If there is VPC2004/IBM0068/LEN0068 in DSDT, then it will be fine if we do not register rfkill in acer-wmi.
>
> Any thought?
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines
@ 2011-11-23 1:27 Lee, Chun-Yi
0 siblings, 0 replies; 29+ messages in thread
From: Lee, Chun-Yi @ 2011-11-23 1:27 UTC (permalink / raw)
To: mjg
Cc: linux-kernel, Lee, Chun-Yi, Carlos Corbacho, Dmitry Torokhov,
Corentin Chary, Thomas Renninger
From: "Lee, Chun-Yi" <jlee@suse.com>
Have many non-acer machines have AMW0_GUID2 method in DSDT, in
original acer-wmi design, driver direct set ACER_CAP_WIRELESS flag
for those machines but didn't check the functionality for set/get
wireless state.
It causes acer-wmi driver create a broken wireless rfkill and it
already set to soft blocked.
So, this patch add a wireless capability check before we set
ACER_CAP_WIRELESS flag to the machines that were included AMW0_GUID2.
It avoid acer-wmi create a broken wireless rfkill.
Thank's for Matthew Garrett give the idea.
Reference: brc#674353
https://bugzilla.redhat.com/show_bug.cgi?id=674353
Tested on Lenovo E520.
Tested on Acer TravelMate 4750.
Tested-by: mr.kobzar <mr.kobzar@gmail.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
drivers/platform/x86/acer-wmi.c | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 88dfecf..5dfa46a 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -678,6 +678,37 @@ static acpi_status AMW0_find_mailled(void)
return AE_OK;
}
+static void AMW0_GUID2_set_capabilities(void)
+{
+ acpi_status status;
+ u32 original_state, new_state;
+
+ /* set wireless capability when detected has quirk */
+ if (quirks->wireless > 0) {
+ interface->capability |= ACER_CAP_WIRELESS;
+ return;
+ }
+
+ status = AMW0_get_u32(&original_state, ACER_CAP_WIRELESS);
+ if (ACPI_FAILURE(status))
+ return;
+
+ status = AMW0_set_u32(!original_state, ACER_CAP_WIRELESS);
+ if (ACPI_FAILURE(status))
+ return;
+
+ status = AMW0_get_u32(&new_state, ACER_CAP_WIRELESS);
+ if (ACPI_FAILURE(status))
+ return;
+
+ status = AMW0_set_u32(original_state, ACER_CAP_WIRELESS);
+ if (ACPI_FAILURE(status))
+ return;
+
+ if (new_state != original_state)
+ interface->capability |= ACER_CAP_WIRELESS;
+}
+
static acpi_status AMW0_set_capabilities(void)
{
struct wmab_args args;
@@ -691,7 +722,7 @@ static acpi_status AMW0_set_capabilities(void)
* work.
*/
if (wmi_has_guid(AMW0_GUID2)) {
- interface->capability |= ACER_CAP_WIRELESS;
+ AMW0_GUID2_set_capabilities();
return AE_OK;
}
--
1.7.7
^ permalink raw reply related [flat|nested] 29+ messages in thread
end of thread, other threads:[~2012-03-19 14:48 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 6:31 [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines Lee, Chun-Yi
2012-01-09 8:01 ` Carlos Corbacho
2012-01-09 10:00 ` joeyli
2012-01-09 22:15 ` Carlos Corbacho
2012-01-11 4:26 ` joeyli
2012-01-11 16:54 ` Ike Panhc
2012-01-12 0:21 ` joeyli
2012-01-25 1:18 ` Ike Panhc
2012-01-20 2:44 ` joeyli
2012-01-25 1:29 ` Ike Panhc
2012-01-25 1:57 ` [PATCH] acer-wmi: No wifi rfkill on Lenovo machines Ike Panhc
2012-01-25 2:14 ` Ike Panhc
2012-01-26 2:53 ` joeyli
2012-02-03 8:46 ` [PATCH v2] " Ike Panhc
2012-02-03 8:55 ` Ike Panhc
2012-02-06 9:55 ` joeyli
2012-02-11 19:10 ` Jonathan Nieder
2012-02-21 9:22 ` [PATCH resend] " Jonathan Nieder
2012-03-14 21:53 ` [PATCH 3.0.y] " Jonathan Nieder
2012-03-14 22:02 ` Greg KH
2012-03-14 22:17 ` Jonathan Nieder
2012-03-16 4:03 ` Ike Panhc
2012-03-16 6:11 ` joeyli
2012-03-16 17:20 ` Greg KH
2012-03-19 2:08 ` joeyli
2012-03-19 12:40 ` Andrey
2012-03-19 14:48 ` Jonathan Nieder
2012-01-24 0:04 ` [PATCH] acer-wmi: check wireless capability on AMW0_GUID2 machines joeyli
-- strict thread matches above, loose matches on Subject: below --
2011-11-23 1:27 Lee, Chun-Yi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.