Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: wmi: Call WCxx methods when setting data blocks

After performing some tests with a custom SSDT table available at
https://github.com/Wer-Wolf/acpi-wmi-ssdt i found out that Windows
also enables data block collection even when the data block is
being set.

Emulate this behaviour to avoid confusing the ACPI firmware.
The bus-based API already implements this behaviour, so only the
legacy GUID-based API needs to be changed.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20250216193251.866125-8-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Armin Wolf and committed by
Ilpo Järvinen
08c9f402 656f0961

+10
+3
Documentation/wmi/acpi-interface.rst
··· 89 89 instead of events and thus the last two characters of the ACPI method name are 90 90 the method ID of the data block to enable/disable. 91 91 92 + Those ACPI methods are also called before setting data blocks to match the 93 + behaviour of the Windows driver. 94 + 92 95 _WED ACPI method 93 96 ---------------- 94 97
+7
drivers/platform/x86/wmi.c
··· 463 463 if (IS_ERR(wdev)) 464 464 return AE_ERROR; 465 465 466 + if (wmi_device_enable(wdev, true) < 0) 467 + dev_warn(&wdev->dev, "Failed to enable device\n"); 468 + 466 469 status = wmidev_block_set(wdev, instance, in); 470 + 471 + if (wmi_device_enable(wdev, false) < 0) 472 + dev_warn(&wdev->dev, "Failed to disable device\n"); 473 + 467 474 wmi_device_put(wdev); 468 475 469 476 return status;