* [PATCH v2 0/2] Disable rfkill hardblock if BIOS date > 2016
@ 2016-02-15 10:23 Ike Panhc
2016-02-15 10:24 ` [PATCH 1/2] ideapad: No hardware switch after 2016 Ike Panhc
2016-02-15 10:24 ` [PATCH 2/2] ideapad: show has_hw_rfkill_switch in debugfs Ike Panhc
0 siblings, 2 replies; 8+ messages in thread
From: Ike Panhc @ 2016-02-15 10:23 UTC (permalink / raw)
To: Darren Hart; +Cc: platform-driver-x86, linux-kernel
V1: https://lkml.org/lkml/2015/12/15/940
V2 changes:
* Only affect on ideapad whose BIOS date > 2016 to avoid
regression on existing ideapads.
* Show has_hw_rfkill_switch in debugfs
Ike Panhc (2):
ideapad: No hardware switch after 2016
ideapad: show has_hw_rfkill_switch in debugfs
drivers/platform/x86/ideapad-laptop.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--
1.9.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ideapad: No hardware switch after 2016
2016-02-15 10:23 [PATCH v2 0/2] Disable rfkill hardblock if BIOS date > 2016 Ike Panhc
@ 2016-02-15 10:24 ` Ike Panhc
2016-02-15 12:08 ` Bjørn Mork
2016-02-15 10:24 ` [PATCH 2/2] ideapad: show has_hw_rfkill_switch in debugfs Ike Panhc
1 sibling, 1 reply; 8+ messages in thread
From: Ike Panhc @ 2016-02-15 10:24 UTC (permalink / raw)
To: Darren Hart; +Cc: platform-driver-x86, linux-kernel
There are complains on few ideapads that wireless is always hard
blocked but there is no physical radio switch. For now, we need
each user to report its dmi information and ignore hard blocks
on their ideapad. With more and more ideapads available in market
to maintain the dmi table becomes never-ended job.
I've checked lenovo website and for recent design none of the
ideapads has radio switch. I do not believe there will be in the
future. Therefore to disable hard block according to BIOS date is
reasonable approach.
This patch will disable rfkill hardblock if BIOS year > 2015.
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
drivers/platform/x86/ideapad-laptop.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index d78ee15..1b39074d 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -938,7 +938,10 @@ static int ideapad_acpi_add(struct platform_device *pdev)
priv->cfg = cfg;
priv->adev = adev;
priv->platform_device = pdev;
- priv->has_hw_rfkill_switch = !dmi_check_system(no_hw_rfkill_list);
+ if (!dmi_get_date(DMI_BIOS_DATE, &i, NULL, NULL))
+ i = 2015;
+ priv->has_hw_rfkill_switch = (i < 2016) &&
+ !dmi_check_system(no_hw_rfkill_list);
ret = ideapad_sysfs_init(priv);
if (ret)
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ideapad: show has_hw_rfkill_switch in debugfs
2016-02-15 10:23 [PATCH v2 0/2] Disable rfkill hardblock if BIOS date > 2016 Ike Panhc
2016-02-15 10:24 ` [PATCH 1/2] ideapad: No hardware switch after 2016 Ike Panhc
@ 2016-02-15 10:24 ` Ike Panhc
1 sibling, 0 replies; 8+ messages in thread
From: Ike Panhc @ 2016-02-15 10:24 UTC (permalink / raw)
To: Darren Hart; +Cc: platform-driver-x86, linux-kernel
It will be easier for user to report driver status about
hardware radio switch.
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
drivers/platform/x86/ideapad-laptop.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 1b39074d..6e47f0f 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -226,6 +226,8 @@ static int debugfs_status_show(struct seq_file *s, void *data)
seq_printf(s, "BL power value:\t%s\n", value ? "On" : "Off");
seq_printf(s, "=====================\n");
+ seq_printf(s, "Has RF switch:\t%s\n",
+ priv->has_hw_rfkill_switch ? "Yes" : "No");
if (!read_ec_data(priv->adev->handle, VPCCMD_R_RF, &value))
seq_printf(s, "Radio status:\t%s(%lu)\n",
value ? "On" : "Off", value);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ideapad: No hardware switch after 2016
2016-02-15 10:24 ` [PATCH 1/2] ideapad: No hardware switch after 2016 Ike Panhc
@ 2016-02-15 12:08 ` Bjørn Mork
2016-02-15 17:05 ` Ike Panhc
0 siblings, 1 reply; 8+ messages in thread
From: Bjørn Mork @ 2016-02-15 12:08 UTC (permalink / raw)
To: Ike Panhc; +Cc: Darren Hart, platform-driver-x86, linux-kernel
Ike Panhc <ike.pan@canonical.com> writes:
> There are complains on few ideapads that wireless is always hard
> blocked but there is no physical radio switch. For now, we need
> each user to report its dmi information and ignore hard blocks
> on their ideapad. With more and more ideapads available in market
> to maintain the dmi table becomes never-ended job.
>
> I've checked lenovo website and for recent design none of the
> ideapads has radio switch. I do not believe there will be in the
> future. Therefore to disable hard block according to BIOS date is
> reasonable approach.
>
> This patch will disable rfkill hardblock if BIOS year > 2015.
Huh? And what happens when a user upgrades the BIOS on older hardware?
Bjørn
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ideapad: No hardware switch after 2016
2016-02-15 12:08 ` Bjørn Mork
@ 2016-02-15 17:05 ` Ike Panhc
2016-02-15 17:32 ` Bjørn Mork
0 siblings, 1 reply; 8+ messages in thread
From: Ike Panhc @ 2016-02-15 17:05 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Darren Hart, platform-driver-x86, linux-kernel
On 02/15/2016 08:08 PM, Bjørn Mork wrote:
> Ike Panhc <ike.pan@canonical.com> writes:
>
>> There are complains on few ideapads that wireless is always hard
>> blocked but there is no physical radio switch. For now, we need
>> each user to report its dmi information and ignore hard blocks
>> on their ideapad. With more and more ideapads available in market
>> to maintain the dmi table becomes never-ended job.
>>
>> I've checked lenovo website and for recent design none of the
>> ideapads has radio switch. I do not believe there will be in the
>> future. Therefore to disable hard block according to BIOS date is
>> reasonable approach.
>>
>> This patch will disable rfkill hardblock if BIOS year > 2015.
>
> Huh? And what happens when a user upgrades the BIOS on older hardware?
>
That's why I believe > 2015 is a better choice, not > 2014.
Ideapads in market now carries BIOS year 2015 and I found no radio switch
on them. And I don't believe anyone will receive or upgrade BIOS for more
then 1y old machine. In fact I haven't heard anyone upgrading BIOS for a
long time.
--
Ike Panhc
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ideapad: No hardware switch after 2016
2016-02-15 17:05 ` Ike Panhc
@ 2016-02-15 17:32 ` Bjørn Mork
2016-02-16 2:04 ` Ike Panhc
0 siblings, 1 reply; 8+ messages in thread
From: Bjørn Mork @ 2016-02-15 17:32 UTC (permalink / raw)
To: Ike Panhc; +Cc: Darren Hart, platform-driver-x86, linux-kernel
Ike Panhc <ike.pan@canonical.com> writes:
> On 02/15/2016 08:08 PM, Bjørn Mork wrote:
>> Ike Panhc <ike.pan@canonical.com> writes:
>>
>>> There are complains on few ideapads that wireless is always hard
>>> blocked but there is no physical radio switch. For now, we need
>>> each user to report its dmi information and ignore hard blocks
>>> on their ideapad. With more and more ideapads available in market
>>> to maintain the dmi table becomes never-ended job.
>>>
>>> I've checked lenovo website and for recent design none of the
>>> ideapads has radio switch. I do not believe there will be in the
>>> future. Therefore to disable hard block according to BIOS date is
>>> reasonable approach.
>>>
>>> This patch will disable rfkill hardblock if BIOS year > 2015.
>>
>> Huh? And what happens when a user upgrades the BIOS on older hardware?
>>
>
> That's why I believe > 2015 is a better choice, not > 2014.
>
> Ideapads in market now carries BIOS year 2015 and I found no radio switch
> on them. And I don't believe anyone will receive or upgrade BIOS for more
> then 1y old machine. In fact I haven't heard anyone upgrading BIOS for a
> long time.
Now I don't know this platform, but that assumption seems terribly
fragile to me.
Do you own a crystal ball? Are BIOS updates for older machines so
unlikely that you don't even have to consider the possibility? What
about a security flaw affecting the BIOS of a large number of older
machines? Has that never happened?
Sorry, but I don't think it's very nice to owners of older ideapads to
just let their rfkill devices disappear silently if they ever upgrade
their BIOS after 2015. Yes, that may not be possible right now. And it
might never become possible. I don't know. But what exactly is your
plan *if* it becomes possible?
And are you sure there is no proper way to fix this issue? I know
firmware engineers are evil ;) But it would be surprising if they didn't
put some clue about the physical switch into the BIOS tables. I see
that you check flags for wlan/bt/3g existence. Maybe there is another
flag indicating the switch existence? Or maybe some other acpi method?
At the very least, I am convinced there are other hardware you can
correlate the switch existence with.
Bjørn
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ideapad: No hardware switch after 2016
2016-02-15 17:32 ` Bjørn Mork
@ 2016-02-16 2:04 ` Ike Panhc
2016-02-17 7:15 ` Darren Hart
0 siblings, 1 reply; 8+ messages in thread
From: Ike Panhc @ 2016-02-16 2:04 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Darren Hart, platform-driver-x86, linux-kernel
On 02/16/2016 01:32 AM, Bjørn Mork wrote:
> Ike Panhc <ike.pan@canonical.com> writes:
>> On 02/15/2016 08:08 PM, Bjørn Mork wrote:
>>> Ike Panhc <ike.pan@canonical.com> writes:
>>>
>>>> There are complains on few ideapads that wireless is always hard
>>>> blocked but there is no physical radio switch. For now, we need
>>>> each user to report its dmi information and ignore hard blocks
>>>> on their ideapad. With more and more ideapads available in market
>>>> to maintain the dmi table becomes never-ended job.
>>>>
>>>> I've checked lenovo website and for recent design none of the
>>>> ideapads has radio switch. I do not believe there will be in the
>>>> future. Therefore to disable hard block according to BIOS date is
>>>> reasonable approach.
>>>>
>>>> This patch will disable rfkill hardblock if BIOS year > 2015.
>>>
>>> Huh? And what happens when a user upgrades the BIOS on older hardware?
>>>
>>
>> That's why I believe > 2015 is a better choice, not > 2014.
>>
>> Ideapads in market now carries BIOS year 2015 and I found no radio switch
>> on them. And I don't believe anyone will receive or upgrade BIOS for more
>> then 1y old machine. In fact I haven't heard anyone upgrading BIOS for a
>> long time.
>
> Now I don't know this platform, but that assumption seems terribly
> fragile to me.
Maybe I do not say why I propose this patch clearly. User can not use
wireless with network manager if hardblock reports yes faultily. For
now, more then half of ideapad models has no ethernet port and even
with ethernet, user will only find out wireless does not work. User
without ability to blacklist ideapad_laptop will consider Linux faulty
and choose other solution.
>
> Do you own a crystal ball? Are BIOS updates for older machines so
> unlikely that you don't even have to consider the possibility? What
> about a security flaw affecting the BIOS of a large number of older
> machines? Has that never happened?
Upgrading BIOS might brick the machine. Laptop seller likes that even
less.
>
> Sorry, but I don't think it's very nice to owners of older ideapads to
> just let their rfkill devices disappear silently if they ever upgrade
> their BIOS after 2015. Yes, that may not be possible right now. And it
> might never become possible. I don't know. But what exactly is your
> plan *if* it becomes possible?
This is very close to impossible. In this case, I can introduce a new
dmi tables to whitelist those models.
>
> And are you sure there is no proper way to fix this issue? I know
> firmware engineers are evil ;) But it would be surprising if they didn't
> put some clue about the physical switch into the BIOS tables. I see
> that you check flags for wlan/bt/3g existence. Maybe there is another
> flag indicating the switch existence? Or maybe some other acpi method?
Indeed. They are evil.
I've asked acpidump for one of the ideapads[1] and find out those flags[2]
are from EC register[3] which is blackbox to us.
[1] https://bugs.launchpad.net/bugs/1528299
[2] http://pastebin.ubuntu.com/15088110/
[3] http://pastebin.ubuntu.com/15088128/
>
> At the very least, I am convinced there are other hardware you can
> correlate the switch existence with.
I believe so but I do not believe they are ideapads.
--
Ike Panhc
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ideapad: No hardware switch after 2016
2016-02-16 2:04 ` Ike Panhc
@ 2016-02-17 7:15 ` Darren Hart
0 siblings, 0 replies; 8+ messages in thread
From: Darren Hart @ 2016-02-17 7:15 UTC (permalink / raw)
To: Ike Panhc; +Cc: Bjørn Mork, platform-driver-x86, linux-kernel
On Tue, Feb 16, 2016 at 10:04:02AM +0800, Ike Panhc wrote:
> On 02/16/2016 01:32 AM, Bjørn Mork wrote:
> > Ike Panhc <ike.pan@canonical.com> writes:
> >> On 02/15/2016 08:08 PM, Bjørn Mork wrote:
> >>> Ike Panhc <ike.pan@canonical.com> writes:
> >>>
> >>>> There are complains on few ideapads that wireless is always hard
> >>>> blocked but there is no physical radio switch. For now, we need
> >>>> each user to report its dmi information and ignore hard blocks
> >>>> on their ideapad. With more and more ideapads available in market
> >>>> to maintain the dmi table becomes never-ended job.
> >>>>
> >>>> I've checked lenovo website and for recent design none of the
> >>>> ideapads has radio switch. I do not believe there will be in the
> >>>> future. Therefore to disable hard block according to BIOS date is
> >>>> reasonable approach.
> >>>>
> >>>> This patch will disable rfkill hardblock if BIOS year > 2015.
> >>>
> >>> Huh? And what happens when a user upgrades the BIOS on older hardware?
> >>>
> >>
> >> That's why I believe > 2015 is a better choice, not > 2014.
> >>
> >> Ideapads in market now carries BIOS year 2015 and I found no radio switch
> >> on them. And I don't believe anyone will receive or upgrade BIOS for more
> >> then 1y old machine. In fact I haven't heard anyone upgrading BIOS for a
> >> long time.
> >
> > Now I don't know this platform, but that assumption seems terribly
> > fragile to me.
>
> Maybe I do not say why I propose this patch clearly. User can not use
> wireless with network manager if hardblock reports yes faultily. For
> now, more then half of ideapad models has no ethernet port and even
> with ethernet, user will only find out wireless does not work. User
> without ability to blacklist ideapad_laptop will consider Linux faulty
> and choose other solution.
>
> >
> > Do you own a crystal ball? Are BIOS updates for older machines so
> > unlikely that you don't even have to consider the possibility? What
> > about a security flaw affecting the BIOS of a large number of older
> > machines? Has that never happened?
>
> Upgrading BIOS might brick the machine. Laptop seller likes that even
> less.
I'm going to have to concur with Bjørn Mork here. While vendors do not upgrade
their firmware as frequently as they should or as we would like, we really
should avoid penalizing them if they do choose to provide an update!
>
> >
> > Sorry, but I don't think it's very nice to owners of older ideapads to
> > just let their rfkill devices disappear silently if they ever upgrade
> > their BIOS after 2015. Yes, that may not be possible right now. And it
> > might never become possible. I don't know. But what exactly is your
> > plan *if* it becomes possible?
>
> This is very close to impossible. In this case, I can introduce a new
> dmi tables to whitelist those models.
>
The long list DMI whitelist is particularly tedious to generate and maintain.
> >
> > And are you sure there is no proper way to fix this issue? I know
> > firmware engineers are evil ;) But it would be surprising if they didn't
> > put some clue about the physical switch into the BIOS tables. I see
> > that you check flags for wlan/bt/3g existence. Maybe there is another
> > flag indicating the switch existence? Or maybe some other acpi method?
>
> Indeed. They are evil.
>
> I've asked acpidump for one of the ideapads[1] and find out those flags[2]
> are from EC register[3] which is blackbox to us.
>
> [1] https://bugs.launchpad.net/bugs/1528299
> [2] http://pastebin.ubuntu.com/15088110/
> [3] http://pastebin.ubuntu.com/15088128/
>
> >
> > At the very least, I am convinced there are other hardware you can
> > correlate the switch existence with.
>
> I believe so but I do not believe they are ideapads.
I think his point is that you may be able to detect a newer ideapad by the
presence or absence of another device. Heck, CPU ID would give a reasonable idea
regarding date of manufacture if all else fails.
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-17 7:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 10:23 [PATCH v2 0/2] Disable rfkill hardblock if BIOS date > 2016 Ike Panhc
2016-02-15 10:24 ` [PATCH 1/2] ideapad: No hardware switch after 2016 Ike Panhc
2016-02-15 12:08 ` Bjørn Mork
2016-02-15 17:05 ` Ike Panhc
2016-02-15 17:32 ` Bjørn Mork
2016-02-16 2:04 ` Ike Panhc
2016-02-17 7:15 ` Darren Hart
2016-02-15 10:24 ` [PATCH 2/2] ideapad: show has_hw_rfkill_switch in debugfs Ike Panhc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox