Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 910736 Details for
Bug 1021036
ideapad_laptop loads on yoga 2 pro and breaks wireless
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH] ideapad-laptop: Change Lenovo Yoga 2 series rfkill handling
0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch (text/plain), 4.06 KB, created by
Hans de Goede
on 2014-06-20 09:40:29 UTC
(
hide
)
Description:
[PATCH] ideapad-laptop: Change Lenovo Yoga 2 series rfkill handling
Filename:
MIME Type:
Creator:
Hans de Goede
Created:
2014-06-20 09:40:29 UTC
Size:
4.06 KB
patch
obsolete
>From 524bb3d674eda41d184d3eb353fc32d24067e1f3 Mon Sep 17 00:00:00 2001 >From: Hans de Goede <hdegoede@redhat.com> >Date: Fri, 20 Jun 2014 10:29:16 +0200 >Subject: [PATCH v2] ideapad-laptop: Change Lenovo Yoga 2 series rfkill > handling > >It seems that the same problems which lead to adding an rfkill blacklist and >putting the Lenovo Yoga 2 11 on it are also presenton the Lenovo Yoga 2 13 >and Lenovo Yoga 2 Pro too: >https://bugzilla.redhat.com/show_bug.cgi?id=1021036 >https://forums.lenovo.com/t5/Linux-Discussion/Yoga-2-13-not-Pro-Linux-Warning/m-p/1517612 > >Esp. the forums.lenovo.com Lenovo Yoga 2 13 report is interesting, as this >indicates that the rfkill interface does work and is persistent over reboots, >causing blacklisting the driver to not be enough, the wifi needed to be >explictly unblocked through the ideapad-laptop interface for things to work >in this case. > >So this patch does 2 things to get proper rfkill handling on these models: > >1) Instead of blacklisting the rfkill functionality, which means that people >with a firmware blocked wifi get stuck in that situation, ignore the value >reported by the not present hardware rfkill switch, as this is what is causing >ideapad-laptop to wrongly report all radios as hardware blocks. But do register >the rfkill interfaces so that the user can soft [un]block them. > >2) Drop the " 11" postfix from the dmi match string, as the entire Yoga 2 >series is affected. > >Signed-off-by: Hans de Goede <hdegoede@redhat.com> >--- > drivers/platform/x86/ideapad-laptop.c | 34 ++++++++++++++++++++-------------- > 1 file changed, 20 insertions(+), 14 deletions(-) > >diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c >index b4c495a..1f1dfa79 100644 >--- a/drivers/platform/x86/ideapad-laptop.c >+++ b/drivers/platform/x86/ideapad-laptop.c >@@ -87,6 +87,7 @@ struct ideapad_private { > struct backlight_device *blightdev; > struct dentry *debug; > unsigned long cfg; >+ bool has_hw_rfkill_switch; > }; > > static bool no_bt_rfkill; >@@ -473,12 +474,14 @@ static struct rfkill_ops ideapad_rfk_ops = { > > static void ideapad_sync_rfk_state(struct ideapad_private *priv) > { >- unsigned long hw_blocked; >+ unsigned long hw_blocked = 0; > int i; > >- if (read_ec_data(priv->adev->handle, VPCCMD_R_RF, &hw_blocked)) >- return; >- hw_blocked = !hw_blocked; >+ if (priv->has_hw_rfkill_switch) { >+ if (read_ec_data(priv->adev->handle, VPCCMD_R_RF, &hw_blocked)) >+ return; >+ hw_blocked = !hw_blocked; >+ } > > for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) > if (priv->rfk[i]) >@@ -821,14 +824,17 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) > } > } > >-/* Blacklist for devices where the ideapad rfkill interface does not work */ >-static struct dmi_system_id rfkill_blacklist[] = { >- /* The Lenovo Yoga 2 11 always reports everything as blocked */ >+/* >+ * Some ideapads don't have a hardware rfkill switch, reading VPCCMD_R_RF >+ * always results in 0 on these models, causing ideapad_laptop to wrongly >+ * report all radios as hardware-blocked. >+ */ >+static struct dmi_system_id no_hw_rfkill_list[] = { > { >- .ident = "Lenovo Yoga 2 11", >+ .ident = "Lenovo Yoga 2 11 / 13 / Pro", > .matches = { > DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), >- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2 11"), >+ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2"), > }, > }, > {} >@@ -856,6 +862,7 @@ 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); > > ret = ideapad_sysfs_init(priv); > if (ret) >@@ -869,11 +876,10 @@ static int ideapad_acpi_add(struct platform_device *pdev) > if (ret) > goto input_failed; > >- if (!dmi_check_system(rfkill_blacklist)) { >- for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) >- if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg)) >- ideapad_register_rfkill(priv, i); >- } >+ for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) >+ if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg)) >+ ideapad_register_rfkill(priv, i); >+ > ideapad_sync_rfk_state(priv); > ideapad_sync_touchpad_state(priv); > >-- >2.0.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1021036
:
871738
|
910736
|
911300