[PATCH] dell-wmi: Add events created by Dell Rugged 2-in-1s

2016-07-22 Thread Mario Limonciello
The Dell Rugged 7202 has 3 programmable buttons (labeled P1, P2, P3) and a detachable magnetic keyboard/mouse. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-wmi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform

[PATCH v2 1/2] dell-wmi: Adjust wifi catcher to emit KEY_WLAN

2016-07-28 Thread Mario Limonciello
Wifi catcher is a slider switch, that when slid past the on position will emit an event that is intended for launching a wifi application or applet when the machine is turned on. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 2/2] dell-wmi: Add events created by Dell Rugged 2-in-1s

2016-07-28 Thread Mario Limonciello
The Dell Rugged 7202 has 3 programmable buttons (labeled P1, P2, P3) and a detachable keyboard/mouse dock. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-wmi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86

[PATCH] alienware-wmi: Adjust instance of all wmi_evaluate_method calls to 0

2017-06-21 Thread Mario Limonciello
Pali recently noticed that WMI instances are zero indexed. The only reason that these calls all worked properly is because the ASL didn't verify the instance number. Signed-off-by: Mario Limonciello --- drivers/platform/x86/alienware-wmi.c | 8 1 file changed, 4 insertions(

[PATCH v8 02/15] platform/x86: dell-wmi: increase severity of some failures

2017-10-13 Thread Mario Limonciello
f the data should not be relied upon. For the remaining data set vectors, continue to notate a warning in undefined results, but as those are fields that the descriptor intended to refer to other applications, don't fail if they're new values. Signed-off-by: Mario Limonciello --- drive

[PATCH v8 00/15] Introduce support for Dell SMBIOS over WMI

2017-10-13 Thread Mario Limonciello
) * Create separate buffers for WMI and SMI. If WMI is available, free the SMI buffer. * Reorder patches so all fixups come first in the series. Mario Limonciello (15): platform/x86: wmi: Add new method wmidev_evaluate_method platform/x86: dell-wmi: increase severity of some failures p

[PATCH v8 14/15] platform/x86: wmi: create userspace interface for drivers

2017-10-13 Thread Mario Limonciello
ded the WMI bus driver will clean up the character device. Signed-off-by: Mario Limonciello --- MAINTAINERS| 1 + drivers/platform/x86/wmi.c | 116 + include/linux/wmi.h| 6 +++ include/uapi/linux/wmi.h | 26 ++ 4 fil

[PATCH v8 13/15] platform/x86: wmi: Add sysfs attribute for required_buffer_size

2017-10-13 Thread Mario Limonciello
Method type WMI objects need to be able to describe the size of the interface that they will expect to use. Export this information to sysfs and allow vendor drivers to set it. Signed-off-by: Mario Limonciello --- drivers/platform/x86/wmi.c | 31 +++ include/linux

[PATCH v8 12/15] platform/x86: dell-smbios: Add filtering support

2017-10-13 Thread Mario Limonciello
the request. - If the process provides CAP_SYS_RAWIO the whitelist will be overridden. When an item is not in the blacklist, or whitelist and the process is run with insufficient capabilities the call will be rejected. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-smbios.c

[PATCH v8 10/15] platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver

2017-10-13 Thread Mario Limonciello
operate over WMI-ACPI will use an ACPI OperationRegion for a buffer of data storage when SMM calls are performed. This is a safer approach to use in kernel drivers as the SMM will only have access to that OperationRegion. Signed-off-by: Mario Limonciello --- MAINTAINERS

[PATCH v8 03/15] platform/x86: dell-wmi: clean up wmi descriptor check

2017-10-13 Thread Mario Limonciello
Some cases the wrong type was used for errors and checks can be done more cleanly. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Suggested-by: Andy Shevchenko --- drivers/platform/x86/dell-wmi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

[PATCH v8 08/15] platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens

2017-10-13 Thread Mario Limonciello
S was missing for this driver. Add myself and Pali to maintainers list for it. Signed-off-by: Mario Limonciello --- .../ABI/testing/sysfs-platform-dell-smbios | 21 ++ MAINTAINERS| 7 + drivers/platform/x86/dell-smbios.c

[PATCH v8 11/15] platform/x86: dell-smbios-smm: test for WSMT

2017-10-13 Thread Mario Limonciello
igned-off-by: Mario Limonciello --- drivers/platform/x86/dell-smbios-smm.c | 33 + drivers/platform/x86/dell-smbios.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/drivers/platform/x86/dell-smbios-smm.c b/drivers/platform/x86/dell-smbios-smm.c

[PATCH v8 09/15] platform/x86: dell-smbios: Introduce dispatcher for SMM calls

2017-10-13 Thread Mario Limonciello
ls used by these methods in the dell-smbios.h header for tracking purposes. Signed-off-by: Mario Limonciello --- MAINTAINERS| 6 + drivers/platform/x86/Kconfig | 15 +- drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-laptop.c

[PATCH v8 07/15] platform/x86: dell-smbios: only run if proper oem string is detected

2017-10-13 Thread Mario Limonciello
The proper way to indicate that a system is a 'supported' Dell System is by the presence of this string in OEM strings. Allowing the driver to load on non-Dell systems will have undefined results. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-smbios.c | 7 +

[PATCH v8 15/15] platform/x86: dell-smbios-wmi: introduce userspace interface

2017-10-13 Thread Mario Limonciello
ing functionality to prevent access to certain tokens and calls. Signed-off-by: Mario Limonciello --- Documentation/ABI/testing/dell-smbios-wmi | 41 drivers/platform/x86/dell-smbios-wmi.c| 81 ++- drivers/platform/x86/dell-smbios.h| 11 +

[PATCH v8 05/15] platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver

2017-10-13 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello --- MAINTAINERS| 5 + drivers/platform/x86/Kconfig | 5 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-wmi-descriptor.c | 162 + drivers/platform/x86/dell

[PATCH v8 04/15] platform/x86: dell-wmi: allow 32k return size in the descriptor

2017-10-13 Thread Mario Limonciello
Some platforms this year will be adopting 32k WMI buffer, so don't complain when encountering those. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/pla

[PATCH v8 06/15] platform/x86: wmi: Don't allow drivers to get each other's GUIDs

2017-10-13 Thread Mario Limonciello
-off-by: Mario Limonciello --- drivers/platform/x86/wmi.c | 17 - include/linux/wmi.h| 4 2 files changed, 21 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 4d73a87c2ddf..bcb41c1c7f52 100644 --- a/drivers/platform/x86/wmi.c +++ b

[PATCH v8 01/15] platform/x86: wmi: Add new method wmidev_evaluate_method

2017-10-13 Thread Mario Limonciello
Drivers properly using the wmibus can pass their wmi_device pointer rather than the GUID back to the WMI bus to evaluate the proper methods. Any "new" drivers added that use the WMI bus should use this rather than the old wmi_evaluate_method that would take the GUID. Signed-off

[PATCH v9 12/17] platform/x86: dell-smbios: Add filtering support

2017-10-17 Thread Mario Limonciello
the request. - If the process provides CAP_SYS_RAWIO the whitelist will be overridden. When an item is not in the blacklist, or whitelist and the process is run with insufficient capabilities the call will be rejected. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --

[PATCH v9 16/17] platform/x86: shuffle headers to export for userspace

2017-10-17 Thread Mario Limonciello
All whitelisted commands and tokens should be shared out to userspace so applications don't need to define them in their own headers. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-smbios.h | 19 --- include/uapi/linux/wmi.h

[PATCH v9 17/17] tools/wmi: add a sample for dell smbios communication over WMI

2017-10-17 Thread Mario Limonciello
This application uses the character device /dev/wmi/dell-smbios to perform SMBIOS communications from userspace. It offers demonstrations of a few simple tasks: - Running a class/select command - Querying a token value - Activating a token Signed-off-by: Mario Limonciello --- MAINTAINERS

[PATCH v9 14/17] platform/x86: wmi: create userspace interface for drivers

2017-10-17 Thread Mario Limonciello
ded the WMI bus driver will clean up the character device. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- MAINTAINERS| 1 + drivers/platform/x86/wmi.c | 120 + include/linux/wmi.h| 6 +++ include/uapi

[PATCH v9 15/17] platform/x86: dell-smbios-wmi: introduce userspace interface

2017-10-17 Thread Mario Limonciello
ing functionality to prevent access to certain tokens and calls. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- Documentation/ABI/testing/dell-smbios-wmi | 41 drivers/platform/x86/dell-smbios-wmi.c| 81 ++- drivers/p

[PATCH v9 08/17] platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens

2017-10-17 Thread Mario Limonciello
S was missing for this driver. Add myself and Pali to maintainers list for it. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- .../ABI/testing/sysfs-platform-dell-smbios | 21 ++ MAINTAINERS| 7 + drivers/platform/x86/del

[PATCH v9 10/17] platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver

2017-10-17 Thread Mario Limonciello
operate over WMI-ACPI will use an ACPI OperationRegion for a buffer of data storage when SMM calls are performed. This is a safer approach to use in kernel drivers as the SMM will only have access to that OperationRegion. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Call

[PATCH v9 13/17] platform/x86: wmi: Add sysfs attribute for required_buffer_size

2017-10-17 Thread Mario Limonciello
Method type WMI objects need to be able to describe the size of the interface that they will expect to use. Export this information to sysfs and allow vendor drivers to set it. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/platform/x86/wmi.c

[PATCH v9 00/17] Introduce support for Dell SMBIOS over WMI

2017-10-17 Thread Mario Limonciello
o uapi header * Drop the read interface from character device. It doesn't make sense with multiple different ioctl methods. * Default WMI interface to 32k (This would normally be queried via MOF, but that's not possible yet) * Create separate buffers for WMI and SMI. If WMI is a

[PATCH v9 09/17] platform/x86: dell-smbios: Introduce dispatcher for SMM calls

2017-10-17 Thread Mario Limonciello
ls used by these methods in the dell-smbios.h header for tracking purposes. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- MAINTAINERS| 6 + drivers/platform/x86/Kconfig | 15 +- drivers/platform/x86/Makefile | 1 + d

[PATCH v9 11/17] platform/x86: dell-smbios-smm: test for WSMT

2017-10-17 Thread Mario Limonciello
igned-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/platform/x86/dell-smbios-smm.c | 33 + drivers/platform/x86/dell-smbios.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/drivers/platform/x86/dell-smbios-smm.c b/driver

[PATCH v9 05/17] platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver

2017-10-17 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- MAINTAINERS| 5 + drivers/platform/x86/Kconfig | 5 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-wmi-descriptor.c

[PATCH v9 06/17] platform/x86: wmi: Don't allow drivers to get each other's GUIDs

2017-10-17 Thread Mario Limonciello
-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/platform/x86/wmi.c | 17 - include/linux/wmi.h| 4 2 files changed, 21 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 4d73a87c2ddf..bcb41c1c7f52 100644

[PATCH v9 01/17] platform/x86: wmi: Add new method wmidev_evaluate_method

2017-10-17 Thread Mario Limonciello
Drivers properly using the wmibus can pass their wmi_device pointer rather than the GUID back to the WMI bus to evaluate the proper methods. Any "new" drivers added that use the WMI bus should use this rather than the old wmi_evaluate_method that would take the GUID. Signed-off

[PATCH v9 07/17] platform/x86: dell-smbios: only run if proper oem string is detected

2017-10-17 Thread Mario Limonciello
The proper way to indicate that a system is a 'supported' Dell System is by the presence of this string in OEM strings. Allowing the driver to load on non-Dell systems will have undefined results. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/pl

[PATCH v9 02/17] platform/x86: dell-wmi: increase severity of some failures

2017-10-17 Thread Mario Limonciello
f the data should not be relied upon. For the remaining data set vectors, continue to notate a warning in undefined results, but as those are fields that the descriptor intended to refer to other applications, don't fail if they're new values. Signed-off-by: Mario Limonciello Revi

[PATCH v9 03/17] platform/x86: dell-wmi: clean up wmi descriptor check

2017-10-17 Thread Mario Limonciello
Some cases the wrong type was used for errors and checks can be done more cleanly. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Suggested-by: Andy Shevchenko --- drivers/platform/x86/dell-wmi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

[PATCH v9 04/17] platform/x86: dell-wmi: allow 32k return size in the descriptor

2017-10-17 Thread Mario Limonciello
Some platforms this year will be adopting 32k WMI buffer, so don't complain when encountering those. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/platform/x86/dell-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pl

[PATCH v12 04/16] platform/x86: dell-wmi: clean up wmi descriptor check

2017-11-01 Thread Mario Limonciello
Some cases the wrong type was used for errors and checks can be done more cleanly. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Suggested-by: Andy Shevchenko Reviewed-by: Pali Rohár --- drivers/platform/x86/dell-wmi.c | 10 +- 1 file changed, 5 insertions(

[PATCH v12 16/16] tools/wmi: add a sample for dell smbios communication over WMI

2017-11-01 Thread Mario Limonciello
This application uses the character device /dev/wmi/dell-smbios to perform SMBIOS communications from userspace. It offers demonstrations of a few simple tasks: - Running a class/select command - Querying a token value - Activating a token Signed-off-by: Mario Limonciello Reviewed-by: Edward

[PATCH v12 02/16] platform/x86: wmi: Add new method wmidev_evaluate_method

2017-11-01 Thread Mario Limonciello
Drivers properly using the wmibus can pass their wmi_device pointer rather than the GUID back to the WMI bus to evaluate the proper methods. Any "new" drivers added that use the WMI bus should use this rather than the old wmi_evaluate_method that would take the GUID. Signed-off

[PATCH v12 09/16] platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens

2017-11-01 Thread Mario Limonciello
S was missing for this driver. Add myself and Pali to maintainers list for it. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- .../ABI/testing/sysfs-platform-dell-smbios | 21 ++ MAINTAINERS| 7 + drivers/platform/x86/del

[PATCH v12 08/16] platform/x86: dell-smbios: only run if proper oem string is detected

2017-11-01 Thread Mario Limonciello
The proper way to indicate that a system is a 'supported' Dell System is by the presence of this string in OEM strings. Allowing the driver to load on non-Dell systems will have undefined results. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/pl

[PATCH v12 03/16] platform/x86: dell-wmi: increase severity of some failures

2017-11-01 Thread Mario Limonciello
f the data should not be relied upon. For the remaining data set vectors, continue to notate a warning in undefined results, but as those are fields that the descriptor intended to refer to other applications, don't fail if they're new values. Signed-off-by: Mario Limonciello Revi

[PATCH v12 15/16] platform/x86: dell-smbios-wmi: introduce userspace interface

2017-11-01 Thread Mario Limonciello
ell-smbios filtering functionality will be used to prevent access to certain tokens and calls. All whitelisted commands and tokens are now shared out to userspace so applications don't need to define them in their own headers. Signed-off-by: Mario Limonciello Reviewed-by: Edw

[PATCH v12 13/16] platform/x86: dell-smbios: Add filtering support

2017-11-01 Thread Mario Limonciello
the request. - If the process provides CAP_SYS_RAWIO the whitelist will be overridden. When an item is not in the blacklist, or whitelist and the process is run with insufficient capabilities the call will be rejected. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --

[PATCH v12 10/16] platform/x86: dell-smbios: Introduce dispatcher for SMM calls

2017-11-01 Thread Mario Limonciello
ls used by these methods in the dell-smbios.h header for tracking purposes. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- MAINTAINERS| 6 + drivers/platform/x86/Kconfig | 15 +- drivers/platform/x86/Makefile | 1 + d

[PATCH v12 05/16] platform/x86: dell-wmi: don't check length returned

2017-11-01 Thread Mario Limonciello
This is intended to be variable and provided by the platform. Some platforms this year will be adopting a 32k WMI buffer, so don't complain when encountering those platforms or any other future changes. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Reviewed-by:

[PATCH v12 12/16] platform/x86: dell-smbios-smm: test for WSMT

2017-11-01 Thread Mario Limonciello
igned-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/platform/x86/dell-smbios-smm.c | 33 + drivers/platform/x86/dell-smbios.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/drivers/platform/x86/dell-smbios-smm.c b/driver

[PATCH v12 06/16] platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver

2017-11-01 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- MAINTAINERS| 5 + drivers/platform/x86/Kconfig | 5 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-wmi-descriptor.c

[PATCH v12 11/16] platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver

2017-11-01 Thread Mario Limonciello
operate over WMI-ACPI will use an ACPI OperationRegion for a buffer of data storage when SMM calls are performed. This is a safer approach to use in kernel drivers as the SMM will only have access to that OperationRegion. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Call

[PATCH] platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers

2017-11-01 Thread Mario Limonciello
ods used from driver should still be verified to return success values otherwise deferred probing be used. Signed-off-by: Mario Limonciello --- Note: this patch is intendended on top of the 16 patch series that introduces WMI support. At the time of this submission, v12 is the latest submission

[PATCH v12 07/16] platform/x86: wmi: Don't allow drivers to get each other's GUIDs

2017-11-01 Thread Mario Limonciello
-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Reviewed-by: Pali Rohár --- drivers/platform/x86/wmi.c | 17 - include/linux/wmi.h| 4 2 files changed, 21 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 4d73a87

[PATCH v12 14/16] platform/x86: wmi: create userspace interface for drivers

2017-11-01 Thread Mario Limonciello
ed for the call. Signed-off-by: Mario Limonciello --- MAINTAINERS| 1 + drivers/platform/x86/wmi.c | 189 - include/linux/wmi.h| 5 ++ include/uapi/linux/wmi.h | 26 +++ 4 files changed, 219 insertions(+), 2 deletions(

[PATCH v12 01/16] platform/x86: dell-smbios: Prefix class/select with cmd_

2017-11-01 Thread Mario Limonciello
Later on these structures will be brought up to userspace. the word "class" is a reserved word in c++ and this will prevent uapi headers from being included directly in c++ programs. To make life easier on these applications, prepare the change now. Signed-off-by: Mario Limonciello --

[PATCH v12 00/16] Introduce support for Dell SMBIOS over WMI

2017-11-01 Thread Mario Limonciello
sense with multiple different ioctl methods. * Default WMI interface to 32k (This would normally be queried via MOF, but that's not possible yet) * Create separate buffers for WMI and SMI. If WMI is available, free the SMI buffer. * Reorder patches so all fixups come first in the series.

Re: drivers/x86: add thinkpad-wmi

2017-10-24 Thread Mario Limonciello
Hi Chary, I think it's interesting to see this submission coming in at this time. We're working on setting up precedent for how WMI vendor drivers should work right now and I have another patch series that sets up some concepts. They do clash a little with what you've done here, so let me s

[PATCH 2/2] platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers

2017-11-03 Thread Mario Limonciello
ods used from driver should still be verified to return success values otherwise deferred probing be used. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-smbios-wmi.c | 4 drivers/platform/x86/dell-wmi-descriptor.c | 11 +++ drivers/platform/x86/dell-wmi-descripto

[PATCH 1/2] platform/x86: dell-wmi-descriptor: check if memory was allocated

2017-11-03 Thread Mario Limonciello
devm_kzalloc will return NULL pointer if no memory was allocated. This should be checked. This problem also existed when the driver was dell-wmi.c. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-wmi-descriptor.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers

[PATCH 0/2] Account for uncorrectable failures in probing

2017-11-03 Thread Mario Limonciello
catches potential NULL pointer - Avoid potential race condition between driver init and calling check for if validation successful Mario Limonciello (2): platform/x86: dell-wmi-descriptor: check if memory was allocated platform/x86: dell-*wmi*: Relay failed initial probe to dependent

[PATCH 0/2] Correct some errors caught by buildbot

2017-11-05 Thread Mario Limonciello
Some of the failure scenarios weren't releasing acquired mutexes. Here are some patches that correct them. Mario Limonciello (2): platform/x86: wmi: release mutex on module acquistion failure platform/x86: dell-smbios-wmi: release mutex lock on WMI call failure drivers/platform/x86

[PATCH 1/2] platform/x86: wmi: release mutex on module acquistion failure

2017-11-05 Thread Mario Limonciello
This failure mode should have also released the mutex. Signed-off-by: Mario Limonciello --- drivers/platform/x86/wmi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 8c31ed4..791449a 100644 --- a/drivers

[PATCH 2/2] platform/x86: dell-smbios-wmi: release mutex lock on WMI call failure

2017-11-05 Thread Mario Limonciello
Unbound devices may race with calling this function causing the mutex to stay locked. This failure mode should have released the mutex too. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-smbios-wmi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH v10 04/15] platform/x86: dell-wmi: don't check length returned

2017-10-19 Thread Mario Limonciello
This is intended to be variable and provided by the platform. Some platforms this year will be adopting a 32k WMI buffer, so don't complain when encountering those platforms or any other future changes. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/pl

[PATCH v10 03/15] platform/x86: dell-wmi: clean up wmi descriptor check

2017-10-19 Thread Mario Limonciello
Some cases the wrong type was used for errors and checks can be done more cleanly. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Suggested-by: Andy Shevchenko --- drivers/platform/x86/dell-wmi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

[PATCH v10 13/15] platform/x86: wmi: create userspace interface for drivers

2017-10-19 Thread Mario Limonciello
ed for the call. Signed-off-by: Mario Limonciello --- MAINTAINERS| 1 + drivers/platform/x86/wmi.c | 206 - include/linux/wmi.h| 6 ++ include/uapi/linux/wmi.h | 26 ++ 4 files changed, 237 insertions(+), 2 deletions(

[PATCH v10 11/15] platform/x86: dell-smbios-smm: test for WSMT

2017-10-19 Thread Mario Limonciello
igned-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/platform/x86/dell-smbios-smm.c | 33 + drivers/platform/x86/dell-smbios.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/drivers/platform/x86/dell-smbios-smm.c b/driver

[PATCH v10 02/15] platform/x86: dell-wmi: increase severity of some failures

2017-10-19 Thread Mario Limonciello
f the data should not be relied upon. For the remaining data set vectors, continue to notate a warning in undefined results, but as those are fields that the descriptor intended to refer to other applications, don't fail if they're new values. Signed-off-by: Mario Limonciello Revi

[PATCH v10 14/15] platform/x86: dell-smbios-wmi: introduce userspace interface

2017-10-19 Thread Mario Limonciello
ell-smbios filtering functionality will be used to prevent access to certain tokens and calls. All whitelisted commands and tokens are now shared out to userspace so applications don't need to define them in their own headers. Signed-off-by: Mario Limonciello Reviewed-by: Edw

[PATCH v10 10/15] platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver

2017-10-19 Thread Mario Limonciello
operate over WMI-ACPI will use an ACPI OperationRegion for a buffer of data storage when SMM calls are performed. This is a safer approach to use in kernel drivers as the SMM will only have access to that OperationRegion. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Call

[PATCH v10 15/15] tools/wmi: add a sample for dell smbios communication over WMI

2017-10-19 Thread Mario Limonciello
This application uses the character device /dev/wmi/dell-smbios to perform SMBIOS communications from userspace. It offers demonstrations of a few simple tasks: - Running a class/select command - Querying a token value - Activating a token Signed-off-by: Mario Limonciello Reviewed-by: Edward

[PATCH v10 08/15] platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens

2017-10-19 Thread Mario Limonciello
S was missing for this driver. Add myself and Pali to maintainers list for it. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- .../ABI/testing/sysfs-platform-dell-smbios | 21 ++ MAINTAINERS| 7 + drivers/platform/x86/del

[PATCH v10 12/15] platform/x86: dell-smbios: Add filtering support

2017-10-19 Thread Mario Limonciello
the request. - If the process provides CAP_SYS_RAWIO the whitelist will be overridden. When an item is not in the blacklist, or whitelist and the process is run with insufficient capabilities the call will be rejected. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --

[PATCH v10 09/15] platform/x86: dell-smbios: Introduce dispatcher for SMM calls

2017-10-19 Thread Mario Limonciello
ls used by these methods in the dell-smbios.h header for tracking purposes. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- MAINTAINERS| 6 + drivers/platform/x86/Kconfig | 15 +- drivers/platform/x86/Makefile | 1 + d

[PATCH v10 07/15] platform/x86: dell-smbios: only run if proper oem string is detected

2017-10-19 Thread Mario Limonciello
The proper way to indicate that a system is a 'supported' Dell System is by the presence of this string in OEM strings. Allowing the driver to load on non-Dell systems will have undefined results. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- drivers/pl

[PATCH v10 05/15] platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver

2017-10-19 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan --- MAINTAINERS| 5 + drivers/platform/x86/Kconfig | 5 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-wmi-descriptor.c

[PATCH v10 00/15] Introduce support for Dell SMBIOS over WMI

2017-10-19 Thread Mario Limonciello
of all buffers and IOCTL commands to uapi header * Drop the read interface from character device. It doesn't make sense with multiple different ioctl methods. * Default WMI interface to 32k (This would normally be queried via MOF, but that's not possible yet) * Create separate buff

[PATCH v10 01/15] platform/x86: wmi: Add new method wmidev_evaluate_method

2017-10-19 Thread Mario Limonciello
Drivers properly using the wmibus can pass their wmi_device pointer rather than the GUID back to the WMI bus to evaluate the proper methods. Any "new" drivers added that use the WMI bus should use this rather than the old wmi_evaluate_method that would take the GUID. Signed-off

[PATCH v10 06/15] platform/x86: wmi: Don't allow drivers to get each other's GUIDs

2017-10-19 Thread Mario Limonciello
-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Reviewed-by: Pali Rohár --- drivers/platform/x86/wmi.c | 17 - include/linux/wmi.h| 4 2 files changed, 21 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 4d73a87

[PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-30 Thread Mario Limonciello
There may be race conditions with multiple different functions working on a module wide buffer causing one function to get the wrong results. Suggested-by: Pali Rohar Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-laptop.c | 188 - 1 file

[PATCH v2] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-31 Thread Mario Limonciello
Rohar Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-laptop.c | 188 - 1 file changed, 103 insertions(+), 85 deletions(-) diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index fc2dfc8..a7b1419 100644 --- a

[PATCH] platform/x86: dell-smbios: Correct notation for filtering

2018-01-05 Thread Mario Limonciello
The class/select were mistakingly put into octal notation but intended to be in decimal notation. Suggest-by: Pali Rohar Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-smbios.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/dell

[PATCH] platform/x86: dell-laptop: Guard SMBIOS calls with a mutex

2018-01-29 Thread Mario Limonciello
Suggested-by: Pali Rohar Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-laptop.c | 67 ++ 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index fc2dfc8

[PATCH] power/hibernate: Make passing hibernate offsets more friendly

2018-03-06 Thread Mario Limonciello
/power/resume and /sys/power/disk_offset parsing. Signed-off-by: Mario Limonciello --- Documentation/ABI/testing/sysfs-power | 43 + Documentation/power/swsusp.txt| 10 +++- kernel/power/hibernate.c | 88 +-- 3 files changed, 125

[PATCH] platform/x86: intel-wmi-thunderbolt: Add dynamic debugging

2018-09-26 Thread Mario Limonciello
be turned on with dynamic debugging to better root cause this problem. Suggested-by: Mika Westerberg Signed-off-by: Mario Limonciello --- drivers/platform/x86/intel-wmi-thunderbolt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel-wmi

[PATCH] platform/x86: dell-smbios-base: Support systems without tokens

2018-06-15 Thread Mario Limonciello
Some Dell servers can use dell-smbios but they don't support the token interface. Make it optional. Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-smbios-base.c | 35 - 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/dr

[PATCH] r8152: Add support for MAC address pass through on RTL8153-BND

2018-12-11 Thread Mario Limonciello
containing RTL8153-BND should activate MAC pass through and there won't use pass through bit on efuse like in RTL8153-AD. Signed-off-by: Mario Limonciello --- drivers/net/usb/r8152.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/ne

Re: [PATCH] Add a quirk for the Dell XPS 13 (2015) when in PS/2 mode.

2015-04-10 Thread Mario Limonciello
On 04/10/2015 05:39 PM, Pali Rohár wrote: On Wednesday 25 February 2015 21:45:22 Pali Rohár wrote: Hello Mario, have you patched synaptics driver with some resetafter parameter? And have some team in dell found reason for invalid packets? Hi Pali, The reason was found for the invalid packets

Re: [PATCH] Add a quirk for the Dell XPS 13 (2015) when in PS/2 mode.

2015-04-10 Thread Mario Limonciello
On 04/10/2015 06:14 PM, Pali Rohár wrote: On Saturday 11 April 2015 01:07:03 Mario Limonciello wrote: I could see problem with using older kernels which are in more stable or LTS distribution versions... But it is nice that problems are fixes for future 4.0/4.1 versions. And if you located

Re: [PATCH] Add a quirk for the Dell XPS 13 (2015) when in PS/2 mode.

2015-04-13 Thread Mario Limonciello
On 04/10/2015 09:19 PM, Ben Gamari wrote: Mario Limonciello writes: snip snip Is this to say that the issue will be fixed with a BIOS update? Cheers, - Ben From what I have gathered this is expected behavior that won't change. The EC will intentionally drop packets while proce

[PATCH 0/3] Add support for X51-R3 to alienware-wmi

2015-05-27 Thread Mario Limonciello
An upcoming Alienware platform, X51-R3 will support some new features in the WMI BIOS control API as well as emit some scan codes when particular hardware is used in conjunction. Mario Limonciello (3): Add support for X51-R3 Add support for Alienware graphics amplifier. Capture cable

[PATCH 3/3] Capture cable events created by Alienware GFX Amplifier.

2015-05-27 Thread Mario Limonciello
These events are outputted via the keyboard controller. Right now the only actionable event is to restart the system if the cable is removed, but the others are documented in case they will be bubbled up to other parts of the kernel or userspace later on. Signed-off-by: Mario Limonciello

[PATCH 1/3] Add support for X51-R3

2015-05-27 Thread Mario Limonciello
Upcoming platform X51-R3 will support 4 LED zones. Signed-off-by: Mario Limonciello --- drivers/platform/x86/alienware-wmi.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c

[PATCH 2/3] Add support for Alienware graphics amplifier.

2015-05-27 Thread Mario Limonciello
Interface is only supported on the X51-R3 currently. Signed-off-by: Mario Limonciello --- drivers/platform/x86/alienware-wmi.c | 110 +-- 1 file changed, 91 insertions(+), 19 deletions(-) diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86

Re: [PATCH 3/3] Capture cable events created by Alienware GFX Amplifier.

2015-05-27 Thread Mario Limonciello
userspace later on. Signed-off-by: Mario Limonciello --- drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/alienware-wmi.c | 45 2 files changed, 46 insertions(+) diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index

Re: [PATCH 3/3] Capture cable events created by Alienware GFX Amplifier.

2015-05-28 Thread Mario Limonciello
On 05/28/2015 01:30 PM, Greg KH wrote: On Wed, May 27, 2015 at 06:46:05PM -0500, Mario Limonciello wrote: Then fix the GPU drivers. Fix the GPU drivers. Fix the GPU drivers. Nope, fix the GPU drivers. With a fix for the GPU drivers? Great, that's the only acceptable solution. t

Re: [PATCH 0/3] Add support for X51-R3 to alienware-wmi

2015-06-15 Thread Mario Limonciello
On 06/03/2015 06:17 PM, Mario Limonciello wrote: On 05/27/2015 02:36 PM, Limonciello, Mario wrote: An upcoming Alienware platform, X51-R3 will support some new features in the WMI BIOS control API as well as emit some scan codes when particular hardware is used in conjunction. Mario

Re: [PATCH 0/3] Add support for X51-R3 to alienware-wmi

2015-06-03 Thread Mario Limonciello
On 05/27/2015 02:36 PM, Limonciello, Mario wrote: An upcoming Alienware platform, X51-R3 will support some new features in the WMI BIOS control API as well as emit some scan codes when particular hardware is used in conjunction. Mario Limonciello (3): Add support for X51-R3 Add support

[RFC] power/hibernate: Make passing hibernate offsets more friendly

2018-02-28 Thread Mario Limonciello
th it. Signed-off-by: Mario Limonciello --- An alternative to introducing a new sysfs parameter may be to document setting these values via /sys/power/resume. If the wrong signature is found on the swapfile/swap partition by the kernel it does show an error but it updates the values and they'll

[PATCH v2 1/2] power/hibernate: Make passing hibernate offsets more friendly

2018-03-27 Thread Mario Limonciello
Currently the only way to specify a hibernate offset for a swap file is on the kernel command line. Add a new /sys/power/resume_offset that lets userspace specify the offset and disk to use when initiating a hibernate cycle. Signed-off-by: Mario Limonciello --- Documentation/ABI/testing/sysfs

  1   2   3   4   >