* [PATCH] platform/x86: wmi: Skip blocks with zero instances
@ 2023-11-27 22:22 Armin Wolf
2023-11-28 13:14 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Armin Wolf @ 2023-11-27 22:22 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen; +Cc: platform-driver-x86, linux-kernel
Some machines like the HP Omen 17 ck2000nf contain WMI blocks
with zero instances, so any WMI driver which tries to handle the
associated WMI device will fail.
Skip such WMI blocks to avoid confusing any WMI drivers.
Reported-by: Alexis Belmonte <alexbelm48@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218188
Tested-by: Alexis Belmonte <alexbelm48@gmail.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/platform/x86/wmi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index cb7e74f2b009..4f94e4b117f1 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1346,6 +1346,11 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev)
if (debug_dump_wdg)
wmi_dump_wdg(&gblock[i]);
+ if (!gblock[i].instance_count) {
+ dev_info(wmi_bus_dev, FW_INFO "%pUL has zero instances\n", &gblock[i].guid);
+ continue;
+ }
+
if (guid_already_parsed_for_legacy(device, &gblock[i].guid))
continue;
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] platform/x86: wmi: Skip blocks with zero instances
2023-11-27 22:22 [PATCH] platform/x86: wmi: Skip blocks with zero instances Armin Wolf
@ 2023-11-28 13:14 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2023-11-28 13:14 UTC (permalink / raw)
To: Armin Wolf; +Cc: Hans de Goede, platform-driver-x86, LKML
On Mon, 27 Nov 2023, Armin Wolf wrote:
> Some machines like the HP Omen 17 ck2000nf contain WMI blocks
> with zero instances, so any WMI driver which tries to handle the
> associated WMI device will fail.
> Skip such WMI blocks to avoid confusing any WMI drivers.
>
> Reported-by: Alexis Belmonte <alexbelm48@gmail.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218188
> Tested-by: Alexis Belmonte <alexbelm48@gmail.com>
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Thanks for the patch. Should this have a Fixes tag?
--
i.
> ---
> drivers/platform/x86/wmi.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index cb7e74f2b009..4f94e4b117f1 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -1346,6 +1346,11 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev)
> if (debug_dump_wdg)
> wmi_dump_wdg(&gblock[i]);
>
> + if (!gblock[i].instance_count) {
> + dev_info(wmi_bus_dev, FW_INFO "%pUL has zero instances\n", &gblock[i].guid);
> + continue;
> + }
> +
> if (guid_already_parsed_for_legacy(device, &gblock[i].guid))
> continue;
>
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-28 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27 22:22 [PATCH] platform/x86: wmi: Skip blocks with zero instances Armin Wolf
2023-11-28 13:14 ` Ilpo Järvinen
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®