* [PATCH] platform/x86: dell-smbios: Accumulate supported commands across 0xDA tables
@ 2026-11-11 21:44 Rosen Penev
2026-11-12 1:04 ` Armin Wolf
0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-11-11 21:44 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Mario Limonciello, Darren Hart (VMware)
Cc: platform-driver-x86, linux-kernel
parse_da_table() runs once for every SMBIOS 0xDA structure and assigns
da_supported_commands from each one, so the last structure wins. Some
systems expose several 0xDA structures where only some fill in
supportedCmds. On a Dell Precision M4800 there are seven: the first six
report 0x40361f5f and the last reports 0, which leaves
da_supported_commands at 0.
As a result dell_smbios_call_filter() rejects every call made through
/dev/wmi/dell-smbios, even token reads from root:
dell-smbios ...: invalid command, supported commands: 0x 0
dell-smbios ...: Invalid call 0/0: 5c
and dell_smbios_class_is_supported(CLASS_INFO) returns false, so dell-pc
refuses to load.
OR the field across all 0xDA structures instead. With this change the
token read succeeds and dell-pc registers its cool/quiet/balanced/
performance platform profiles on the M4800.
Fixes: 1f8543a5d602 ("platform/x86: dell-smbios: Add filtering support")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index c8e93c12c445..f79847f0bfe2 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -406,7 +406,12 @@ static void __init parse_da_table(const struct dmi_header *dm)
if (dm->length < 17)
return;
- da_supported_commands = table->supportedCmds;
+ /*
+ * Systems may expose several 0xDA structures, and not all of them
+ * fill in supportedCmds, so accumulate rather than letting the last
+ * one win.
+ */
+ da_supported_commands |= table->supportedCmds;
new_da_tokens = krealloc(da_tokens, (da_num_tokens + tokens) *
sizeof(struct calling_interface_token),
--
2.56.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] platform/x86: dell-smbios: Accumulate supported commands across 0xDA tables
2026-11-11 21:44 [PATCH] platform/x86: dell-smbios: Accumulate supported commands across 0xDA tables Rosen Penev
@ 2026-11-12 1:04 ` Armin Wolf
0 siblings, 0 replies; 2+ messages in thread
From: Armin Wolf @ 2026-11-12 1:04 UTC (permalink / raw)
To: Rosen Penev, Hans de Goede, Ilpo Järvinen,
Edward O'Callaghan, Mario Limonciello, Darren Hart (VMware)
Cc: platform-driver-x86, linux-kernel
Am 11.11.26 um 22:44 schrieb Rosen Penev:
> parse_da_table() runs once for every SMBIOS 0xDA structure and assigns
> da_supported_commands from each one, so the last structure wins. Some
> systems expose several 0xDA structures where only some fill in
> supportedCmds. On a Dell Precision M4800 there are seven: the first six
> report 0x40361f5f and the last reports 0, which leaves
> da_supported_commands at 0.
>
> As a result dell_smbios_call_filter() rejects every call made through
> /dev/wmi/dell-smbios, even token reads from root:
>
> dell-smbios ...: invalid command, supported commands: 0x 0
> dell-smbios ...: Invalid call 0/0: 5c
>
> and dell_smbios_class_is_supported(CLASS_INFO) returns false, so dell-pc
> refuses to load.
>
> OR the field across all 0xDA structures instead. With this change the
> token read succeeds and dell-pc registers its cool/quiet/balanced/
> performance platform profiles on the M4800.
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
> Fixes: 1f8543a5d602 ("platform/x86: dell-smbios: Add filtering support")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> drivers/platform/x86/dell/dell-smbios-base.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
> index c8e93c12c445..f79847f0bfe2 100644
> --- a/drivers/platform/x86/dell/dell-smbios-base.c
> +++ b/drivers/platform/x86/dell/dell-smbios-base.c
> @@ -406,7 +406,12 @@ static void __init parse_da_table(const struct dmi_header *dm)
> if (dm->length < 17)
> return;
>
> - da_supported_commands = table->supportedCmds;
> + /*
> + * Systems may expose several 0xDA structures, and not all of them
> + * fill in supportedCmds, so accumulate rather than letting the last
> + * one win.
> + */
> + da_supported_commands |= table->supportedCmds;
>
> new_da_tokens = krealloc(da_tokens, (da_num_tokens + tokens) *
> sizeof(struct calling_interface_token),
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-12 1:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 21:44 [PATCH] platform/x86: dell-smbios: Accumulate supported commands across 0xDA tables Rosen Penev
2026-11-12 1:04 ` Armin Wolf
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®