From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Armin Wolf <W_Armin@gmx.de>
Cc: dimich.dmb@gmail.com, Hans de Goede <hdegoede@redhat.com>,
kuurtb@gmail.com, corbet@lwn.net,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] platform/x86: wmi: Fix WMI event enablement
Date: Wed, 25 Jun 2025 15:28:43 +0300 (EEST) [thread overview]
Message-ID: <e23ffd29-13db-bb11-ee06-0f1203269902@linux.intel.com> (raw)
In-Reply-To: <20250619221440.6737-1-W_Armin@gmx.de>
On Fri, 20 Jun 2025, Armin Wolf wrote:
> It turns out that the Windows WMI-ACPI driver always enables/disables
> WMI events regardless of whether they are marked as expensive or not.
> This finding is further reinforced when reading the documentation of
> the WMI_FUNCTION_CONTROL_CALLBACK callback used by Windows drivers
> for enabling/disabling WMI devices:
>
> The DpWmiFunctionControl routine enables or disables
> notification of events, and enables or disables data
> collection for data blocks that the driver registered
> as expensive to collect.
>
> Follow this behavior to fix the WMI event used for reporting hotkey
> events on the Dell Latitude 5400 and likely many more devices.
>
> Reported-by: Dmytro Bagrii <dimich.dmb@gmail.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220246
> Tested-by: Dmytro Bagrii <dimich.dmb@gmail.com>
> Fixes: 656f0961d126 ("platform/x86: wmi: Rework WCxx/WExx ACPI method handling")
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> ---
> drivers/platform/x86/wmi.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index 21b7e54bd7ab..4e86a422f05f 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -180,16 +180,22 @@ static int wmi_device_enable(struct wmi_device *wdev, bool enable)
> acpi_handle handle;
> acpi_status status;
>
> - if (!(wblock->gblock.flags & ACPI_WMI_EXPENSIVE))
> - return 0;
> -
> if (wblock->dev.dev.type == &wmi_type_method)
> return 0;
>
> - if (wblock->dev.dev.type == &wmi_type_event)
> + if (wblock->dev.dev.type == &wmi_type_event) {
> + /*
> + * Windows always enables/disables WMI events, even when they are
> + * not marked as being expensive. We follow this behavior for
Hi Armin,
Is the wording in the comment reversed? (I suspect you didn't mean to
include "not" into that statement?)
> + * compatibility reasons.
> + */
> snprintf(method, sizeof(method), "WE%02X", wblock->gblock.notify_id);
> - else
> + } else {
> + if (!(wblock->gblock.flags & ACPI_WMI_EXPENSIVE))
> + return 0;
> +
> get_acpi_method_name(wblock, 'C', method);
> + }
>
> /*
> * Not all WMI devices marked as expensive actually implement the
>
--
i.
next prev parent reply other threads:[~2025-06-25 12:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 22:14 [PATCH 1/2] platform/x86: wmi: Fix WMI event enablement Armin Wolf
2025-06-19 22:14 ` [PATCH 2/2] platform/x86: wmi: Update documentation of WCxx/WExx ACPI methods Armin Wolf
2025-06-25 12:28 ` Ilpo Järvinen [this message]
2025-06-25 13:09 ` [PATCH 1/2] platform/x86: wmi: Fix WMI event enablement Armin Wolf
2025-06-25 13:13 ` Ilpo Järvinen
2025-06-26 15:19 ` Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e23ffd29-13db-bb11-ee06-0f1203269902@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=W_Armin@gmx.de \
--cc=corbet@lwn.net \
--cc=dimich.dmb@gmail.com \
--cc=hdegoede@redhat.com \
--cc=kuurtb@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.