mbox series

[v2,0/5] platform/x86: wmi: Fixes for event data handling

Message ID 20240219115919.16526-1-W_Armin@gmx.de (mailing list archive)
Headers show
Series platform/x86: wmi: Fixes for event data handling | expand

Message

Armin Wolf Feb. 19, 2024, 11:59 a.m. UTC
This patch series contains fixes for the handling of WMI event data
when receiving WMI events.

The first patch aims to prevent WMI event drivers depending on WMI
event data support from binding to a WMI device which does not
support the retrieval of additional WMI event data.

The second patch makes sure that the WMI core not only checks that
evaluating the ACPI control method used for retrieving additional
event data (_WED) succeeded, but that it also returned any data.

The third patch fixes an compatibility issue with the ACPI firmware
of some ASUS notebooks. This issue was "fixed" inside asus-wmi by
manually retrieving event data items, sidestepping the WMI core.

The last patch reverts this hacky fixup, as the underlying issue is
now handled inside the WMI core itself.

All patches where tested on a Dell Inspiron 3505 and a ASUS Prime
B650-Plus motherboard. However the last patch should be tested on an
actual ASUS notebook which is affected by the workaround.

Changes since v1:
- Drivers are not "he"

Armin Wolf (5):
  platform/x86: wmi: Prevent incompatible event driver from probing
  platform/x86: wmi: Check if event data is not NULL
  platform/x86: wmi: Always evaluate _WED when receiving an event
  platform/x86: wmi: Update documentation regarding _WED
  Revert "platform/x86: asus-wmi: Support WMI event queue"

 Documentation/wmi/acpi-interface.rst |  5 +-
 drivers/platform/x86/asus-wmi.c      | 71 ++------------------------
 drivers/platform/x86/wmi.c           | 74 +++++++++++++++++++++++-----
 include/linux/wmi.h                  |  2 +-
 4 files changed, 71 insertions(+), 81 deletions(-)

--
2.39.2

Comments

Ilpo Järvinen Feb. 19, 2024, 12:06 p.m. UTC | #1
On Mon, 19 Feb 2024 12:59:14 +0100, Armin Wolf wrote:

> This patch series contains fixes for the handling of WMI event data
> when receiving WMI events.
> 
> The first patch aims to prevent WMI event drivers depending on WMI
> event data support from binding to a WMI device which does not
> support the retrieval of additional WMI event data.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/5] platform/x86: wmi: Prevent incompatible event driver from probing
      commit: b448bcb4cf02b27946f9bd6c4ded17e2209bf271
[2/5] platform/x86: wmi: Check if event data is not NULL
      commit: b5003c979eb4128c7ca81ed144491e85232979b6
[3/5] platform/x86: wmi: Always evaluate _WED when receiving an event
      commit: 2b30ea09e77d701f0b0b02243bdcf8aa408e4214
[4/5] platform/x86: wmi: Update documentation regarding _WED
      commit: c865db581c295085fbfc1b6802f87c38ad92e4ca
[5/5] Revert "platform/x86: asus-wmi: Support WMI event queue"
      commit: b27bb403e136b12cafeff4467d495bbc8c9b7441

--
 i.