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 16:13:56 +0300 (EEST) [thread overview]
Message-ID: <bbc53a25-1b8d-ad3f-fc67-381c7d11a9b1@linux.intel.com> (raw)
In-Reply-To: <b32b6f01-cac7-4cd4-b73b-eb4bbce63039@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 3234 bytes --]
On Wed, 25 Jun 2025, Armin Wolf wrote:
> Am 25.06.25 um 14:28 schrieb Ilpo Järvinen:
> > 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?)
>
> Actually i did.
>
> The WMI-ACPI spec seemed to suggest that WMI events should be enabled/disabled
> only if they are being marked as expensive, however it turned out that WMI
> events
> should also be enabled/disabled even if _not_ marked as being expensive.
Okay, fine. I seemingly missed the negation in the ACPI_WMI_EXPENSIVE
check.
--
i.
> Besides that another user tested this patch on his machine, so:
>
> Tested-by: Grzegorz Suwaj <grzegorzssuwaj@gmail.com>
>
> Thanks,
> Armin Wolf
>
> > > + * 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
> > >
>
next prev parent reply other threads:[~2025-06-25 13:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 22:14 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 ` [PATCH 1/2] platform/x86: wmi: Fix WMI event enablement Ilpo Järvinen
2025-06-25 13:09 ` Armin Wolf
2025-06-25 13:13 ` Ilpo Järvinen [this message]
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=bbc53a25-1b8d-ad3f-fc67-381c7d11a9b1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®