All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Mak <bmak@nvidia.com>
To: "Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "David Cemin" <dcemin@nvidia.com>,
	"Lucas De Marchi" <ldemarchi@nvidia.com>,
	"Kurt Borja" <kuurtb@gmail.com>,
	"Stuart Hayes" <stuart.w.hayes@gmail.com>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Pali Rohár" <pali@kernel.org>,
	"Lyndon Sanche" <lsanche@lyndeno.ca>,
	"Armin Wolf" <W_Armin@gmx.de>,
	"Prasanth Ksr" <prasanth.ksr@dell.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Brian Mak" <bmak@nvidia.com>
Subject: [PATCH v2 08/10] platform: dell: smbios: Add quirk for non-functional calling interface
Date: Mon, 23 Nov 2026 15:08:59 -0800	[thread overview]
Message-ID: <20261123230905.13899-9-bmak@nvidia.com> (raw)
In-Reply-To: <20261123230905.13899-1-bmak@nvidia.com>

On Dell RTX Spark laptops, the SMBIOS calling interface completes every
request with an all-zero buffer, even for requests that should fail.
Drivers that rely on it, such as dell-laptop and dell-pc, end up
reporting bogus state, like battery charge modes and thermal modes.

Add a DMI quirk list for platforms with a non-functional calling
interface, and export dell_smbios_calls_functional() so that consumers
can avoid loading on them. dell-smbios itself still loads, as dell-wmi
depends on it.

Signed-off-by: Brian Mak <bmak@nvidia.com>
---
 drivers/platform/dell/dell-smbios-base.c | 22 ++++++++++++++++++++++
 drivers/platform/dell/dell-smbios.h      |  1 +
 2 files changed, 23 insertions(+)

diff --git a/drivers/platform/dell/dell-smbios-base.c b/drivers/platform/dell/dell-smbios-base.c
index c8e93c12c445..e07cbb0e8a6a 100644
--- a/drivers/platform/dell/dell-smbios-base.c
+++ b/drivers/platform/dell/dell-smbios-base.c
@@ -390,6 +390,28 @@ bool dell_smbios_class_is_supported(u16 class)
 }
 EXPORT_SYMBOL_GPL(dell_smbios_class_is_supported);
 
+/*
+ * Some Dell firmware completes its proprietary SMBIOS calls with all zeroes,
+ * so any value read through it (tokens, battery and thermal modes)
+ * is invalid.
+ */
+static const struct dmi_system_id dell_smbios_calls_broken_list[] = {
+	{
+		.ident = "Dell XPS 16 DX16263",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "XPS 16 DX16263"),
+		},
+	},
+	{ }
+};
+
+bool dell_smbios_calls_functional(void)
+{
+	return !dmi_check_system(dell_smbios_calls_broken_list);
+}
+EXPORT_SYMBOL_GPL(dell_smbios_calls_functional);
+
 static void __init parse_da_table(const struct dmi_header *dm)
 {
 	/* Final token is a terminator, so we don't want to copy it */
diff --git a/drivers/platform/dell/dell-smbios.h b/drivers/platform/dell/dell-smbios.h
index 1e64803bc00d..26f54364ffde 100644
--- a/drivers/platform/dell/dell-smbios.h
+++ b/drivers/platform/dell/dell-smbios.h
@@ -89,6 +89,7 @@ int dell_laptop_register_notifier(struct notifier_block *nb);
 int dell_laptop_unregister_notifier(struct notifier_block *nb);
 void dell_laptop_call_notifier(unsigned long action, void *data);
 bool dell_smbios_class_is_supported(u16 class);
+bool dell_smbios_calls_functional(void);
 
 /* for the supported backends */
 #ifdef CONFIG_DELL_SMBIOS_WMI
-- 
2.53.0


  parent reply	other threads:[~2026-11-23 23:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 23:08 [PATCH v2 00/10] platform: dell: Move out of x86 and support Dell XPS 16 Creator Edition Brian Mak
2026-11-23 23:08 ` [PATCH v2 01/10] platform/x86: dell: Make uart-backlight x86 only Brian Mak
2026-11-23 23:08 ` [PATCH v2 02/10] platform/x86: dell: dcdbas: Add missing kernel-doc descriptions Brian Mak
2026-11-23 23:08 ` [PATCH v2 03/10] platform: dell: Move out of x86 directory Brian Mak
2026-11-23 23:08 ` [PATCH v2 04/10] MAINTAINERS: Add Dell platform drivers entry Brian Mak
2026-11-23 23:08 ` [PATCH v2 05/10] platform: dell: laptop: Compile out i8042 usage without SERIO_I8042 Brian Mak
2026-11-23 23:08 ` [PATCH v2 06/10] platform: dell: Allow DELL_LAPTOP to be arch-independent Brian Mak
2026-11-23 23:08 ` [PATCH v2 07/10] platform: dell: smbios-wmi: Fix probe on RTX Spark Brian Mak
2026-11-23 23:08 ` Brian Mak [this message]
2026-11-23 23:09 ` [PATCH v2 09/10] platform: dell: laptop: Don't load if SMBIOS calls are non-functional Brian Mak
2026-11-23 23:09 ` [PATCH v2 10/10] platform: dell: pc: " Brian Mak
2026-11-30 21:01 ` [PATCH v2 00/10] platform: dell: Move out of x86 and support Dell XPS 16 Creator Edition Brian Mak
2026-11-30 21:14 ` Mario Limonciello
2026-11-30 21:46   ` Brian Mak
2026-11-30 21:49     ` Mario Limonciello
2026-11-30 21:53       ` Brian Mak
2026-11-30 22:32         ` Mario Limonciello
2026-12-01  9:44           ` Hans de Goede
2026-12-01  9:45             ` Hans de Goede

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=20261123230905.13899-9-bmak@nvidia.com \
    --to=bmak@nvidia.com \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=W_Armin@gmx.de \
    --cc=corbet@lwn.net \
    --cc=dcemin@nvidia.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kuurtb@gmail.com \
    --cc=ldemarchi@nvidia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsanche@lyndeno.ca \
    --cc=mjg59@srcf.ucam.org \
    --cc=pali@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=prasanth.ksr@dell.com \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stuart.w.hayes@gmail.com \
    /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.