diff options
| author | Armin Wolf <W_Armin@gmx.de> | 2025-02-16 20:32:50 +0100 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-02-24 13:30:15 +0200 |
| commit | 08c9f4029007325e0bbd4fdda05650b03e43f071 (patch) | |
| tree | 8851b5bebb67a52710455ecaa63ba8dfe31071f5 /drivers/platform | |
| parent | 656f0961d126f5d1f0bcc62fa8bb7598d8f89207 (diff) | |
| download | linux-next-08c9f4029007325e0bbd4fdda05650b03e43f071.tar.gz linux-next-08c9f4029007325e0bbd4fdda05650b03e43f071.zip | |
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>
Diffstat (limited to 'drivers/platform')
| -rw-r--r-- | drivers/platform/x86/wmi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 9377c5e6ba6f..e46453750d5f 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -463,7 +463,14 @@ acpi_status wmi_set_block(const char *guid_string, u8 instance, const struct acp if (IS_ERR(wdev)) return AE_ERROR; + if (wmi_device_enable(wdev, true) < 0) + dev_warn(&wdev->dev, "Failed to enable device\n"); + status = wmidev_block_set(wdev, instance, in); + + if (wmi_device_enable(wdev, false) < 0) + dev_warn(&wdev->dev, "Failed to disable device\n"); + wmi_device_put(wdev); return status; |
