platform/x86: peaq-wmi: Add DMI check before binding to the WMI interface
Subsystems (2)
PATCH 1/1 platform/x86: peaq-wmi: Add DMI check before binding to the WMI interface
It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not as unique as a GUID should be and is used on some other devices too.
This is causing spurious key-press reports on these other devices.
This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to ensure that it is actually running on a PEAQ 2-in-1, fixing the spurious key-presses on these other devices.
--- drivers/platform/x86/peaq-wmi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/platform/x86/peaq-wmi.c +18 -0
@@ -8,6 +8,7 @@*/ #include <linux/acpi.h> +#include <linux/dmi.h> #include <linux/input-polldev.h> #include <linux/kernel.h> #include <linux/module.h>
@@ -64,8 +65,22 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) } } +/* Some other devices (Shuttle XS35) use the same WMI GUID for other purposes */ +static const struct dmi_system_id peaq_dmi_table[] = { + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"PEAQ" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"PEAQ PMM C1010 MD99187" ), + }, + }, +}; +static int __init peaq_wmi_init (void ) { +/* WMI GUID is not unique, also check for a DMI match */ +if (!dmi_check_system (peaq_dmi_table)) +return -ENODEV ; +if (!wmi_has_guid (PEAQ_DOLBY_BUTTON_GUID ))return -ENODEV ;
@@ -86,6 +101,9 @@ static int __init peaq_wmi_init(void) static void __exit peaq_wmi_exit(void) { +if (!dmi_check_system (peaq_dmi_table)) +return ; +if (!wmi_has_guid (PEAQ_DOLBY_BUTTON_GUID ))return ;
Signature · 1 line
2.14.2
Quoted 9 lines · Hans de Goede
It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not as unique as a GUID should be and is used on some other devices too.
This is causing spurious key-press reports on these other devices.
This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to ensure that it is actually running on a PEAQ 2-in-1, fixing the spurious key-presses on these other devices.
Recently I have pushed similar patch (another device). Can you rebase against testing?
Quoted 56 lines
Signed-off-by Hans de Goede <[email protected]>--- drivers/platform/x86/peaq-wmi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)drivers/platform/x86/peaq-wmi.c +18
-1@@ -8,6 +8,7 @@*/ #include <linux/acpi.h> +#include <linux/dmi.h> #include <linux/input-polldev.h> #include <linux/kernel.h> #include <linux/module.h> @@ -64,8 +65,22 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) } } +/* Some other devices (Shuttle XS35) use the same WMI GUID for other purposes */ +static const struct dmi_system_id peaq_dmi_table[] = { + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"PEAQ" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"PEAQ PMM C1010 MD99187" ), + }, + }, +}; +static int __init peaq_wmi_init (void ) { +/* WMI GUID is not unique, also check for a DMI match */ +if (!dmi_check_system (peaq_dmi_table)) +return -ENODEV ; +if (!wmi_has_guid (PEAQ_DOLBY_BUTTON_GUID ))return -ENODEV ;@@ -86,6 +101,9 @@ static int __init peaq_wmi_init(void) static void __exit peaq_wmi_exit(void) { +if (!dmi_check_system (peaq_dmi_table)) +return ; +if (!wmi_has_guid (PEAQ_DOLBY_BUTTON_GUID ))return ; --2.14.2
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Hans de Goede
It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not as unique as a GUID should be and is used on some other devices too.
This is causing spurious key-press reports on these other devices.
Quoted 7 lines
Quoted 4 lines
This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to ensure that it is actually running on a PEAQ 2-in-1, fixing the spurious key-presses on these other devices.
Recently I have pushed similar patch (another device). Can you rebase against testing?
That patch adds a blacklist, for yet another model then the 2 bugreports:
Quoted 2 lines
Quoted 2 lines
which I've received. My patch adds a whitelist instead as it seems the GUID used is some very generic GUID, so the blacklist patch should simply be dropped, after which my patch should apply cleanly :)
Regards,
Hans
Quoted 57 lines
Quoted 54 lines
Signed-off-by Hans de Goede <[email protected]>--- drivers/platform/x86/peaq-wmi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)drivers/platform/x86/peaq-wmi.c +18
-1@@ -8,6 +8,7 @@*/ #include <linux/acpi.h> +#include <linux/dmi.h> #include <linux/input-polldev.h> #include <linux/kernel.h> #include <linux/module.h> @@ -64,8 +65,22 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) } } +/* Some other devices (Shuttle XS35) use the same WMI GUID for other purposes */ +static const struct dmi_system_id peaq_dmi_table[] = { + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"PEAQ" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"PEAQ PMM C1010 MD99187" ), + }, + }, +}; +static int __init peaq_wmi_init (void ) { +/* WMI GUID is not unique, also check for a DMI match */ +if (!dmi_check_system (peaq_dmi_table)) +return -ENODEV ; +if (!wmi_has_guid (PEAQ_DOLBY_BUTTON_GUID ))return -ENODEV ;@@ -86,6 +101,9 @@ static int __init peaq_wmi_init(void) static void __exit peaq_wmi_exit(void) { +if (!dmi_check_system (peaq_dmi_table)) +return ; +if (!wmi_has_guid (PEAQ_DOLBY_BUTTON_GUID ))return ; --2.14.2
Quoted 20 lines · Hans de Goede
Hi,
Quoted 8 lines · Andy Shevchenko
Quoted 6 lines · Hans de Goede
It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not as unique as a GUID should be and is used on some other devices too.
This is causing spurious key-press reports on these other devices.
Quoted 7 lines
Quoted 4 lines
This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to ensure that it is actually running on a PEAQ 2-in-1, fixing the spurious key-presses on these other devices.
Recently I have pushed similar patch (another device). Can you rebase against testing?
Quoted 8 lines
That patch adds a blacklist, for yet another model then the 2 bugreports:
Quoted 2 lines
Quoted 2 lines
which I've received. My patch adds a whitelist instead as it seems the GUID used is some very generic GUID,
Since you are maintainer and moreover have a hardware to test I assume that's correct thing to do...
Quoted 2 lines
so the blacklist patch should simply be
dropped,
... however, the patch can't be dropped.
Either me, or you in v2 need to revert it. Tell me what you prefer here.
In any case, please (re)send with Cc to Kai so he or bug reportes may have a chance to test it as well.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Quoted 33 lines · Andy Shevchenko
Quoted 20 lines · Hans de Goede
Hi,
Quoted 8 lines · Andy Shevchenko
Quoted 6 lines · Hans de Goede
It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not as unique as a GUID should be and is used on some other devices too.
This is causing spurious key-press reports on these other devices.
Quoted 7 lines
Quoted 4 lines
This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to ensure that it is actually running on a PEAQ 2-in-1, fixing the spurious key-presses on these other devices.
Recently I have pushed similar patch (another device). Can you rebase against testing?
Quoted 8 lines
That patch adds a blacklist, for yet another model then the 2 bugreports:
Quoted 2 lines
Quoted 2 lines
which I've received. My patch adds a whitelist instead as it seems the GUID used is some very generic GUID,
Since you are maintainer and moreover have a hardware to test I assume that's correct thing to do...
Quoted 6 lines
Quoted 2 lines
so the blacklist patch should simply be
dropped,... however, the patch can't be dropped.
Either me, or you in v2 need to revert it. Tell me what you prefer here.
Isn't the whole purpose of having a testing branch that patches can actually be dropped. AFAIK this has not even hit -next yet, so IMHO it should just be dropped ?
If it really should be reverted instead I'll leave doing a revert up to you.
Quoted 2 lines
In any case, please (re)send with Cc to Kai so he or bug reportes may have a chance to test it as well.
Ok, done.
Regards,
Hans
Quoted 10 lines · Hans de Goede
Quoted 5 lines · Andy Shevchenko
On Thu, Oct 5, 2017 at 5:27 PM, Hans de Goede <[email protected]> wrote:
... however, the patch can't be dropped.
Either me, or you in v2 need to revert it. Tell me what you prefer here.
Isn't the whole purpose of having a testing branch that patches can actually be dropped. AFAIK this has not even hit -next yet, so IMHO it should just be dropped ?
It used to be until the problem had been discovered, i.e. absence of committer's Signed-off-by.
So, starting from this cycle testing branch is categorized as 'published' where we can't do any non-fast-forward work anymore.
Quoted 2 lines
If it really should be reverted instead I'll leave doing a revert up to you.
I heard you.
Signature · 2 lines
With Best Regards, Andy Shevchenko