mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: "Brian Mak" <bmak@nvidia.com>, "Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "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>,
	"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
Subject: Re: [PATCH 5/8] platform: dell: smbios-wmi: Fix probe on RTX Spark
Date: Sat, 21 Nov 2026 14:44:02 +0100	[thread overview]
Message-ID: <77d84196-1e9a-46ef-835a-56275087631c@gmx.de> (raw)
In-Reply-To: <20261121000556.173028-6-bmak@nvidia.com>

Am 21.11.26 um 01:05 schrieb Brian Mak:

> dell-smbios-wmi fails to probe on RTX Spark due to a hardcoded SMBIOS
> handle (0xB100) of type 0xB1 (misc BIOS flags) that is numbered
> differently on Dell RTX Spark laptops. Instead, search for all SMBIOS
> handles of type 0xB1, and if there is just one, use that one. If handle
> 0xB100 exists, always use that.
>
> This fixes dell-smbios-wmi probe on Dell RTX Spark laptops.

Hi,

i think you can drop the special handling of handle 0xB100 and instead
just check if the SMBIOS type is 0xB1. AFAIK the PCI code also parses
some parts of the 0xB1 type, and there the handle value is irrelevant.

Thanks,
Armin Wolf

> Signed-off-by: Brian Mak <bmak@nvidia.com>
> ---
>   drivers/platform/dell/dell-smbios-wmi.c | 37 +++++++++++++++++++------
>   1 file changed, 29 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/platform/dell/dell-smbios-wmi.c b/drivers/platform/dell/dell-smbios-wmi.c
> index 7a5c6d7730ab..ff859d9039b9 100644
> --- a/drivers/platform/dell/dell-smbios-wmi.c
> +++ b/drivers/platform/dell/dell-smbios-wmi.c
> @@ -273,7 +273,13 @@ static const struct wmi_device_id dell_smbios_wmi_id_table[] = {
>   	{ },
>   };
>   
> -static void parse_b1_table(const struct dmi_header *dm)
> +struct b1_search {
> +	bool found_b100;
> +	unsigned int count;
> +	u16 flags0;
> +};
> +
> +static void parse_b1_table(const struct dmi_header *dm, struct b1_search *search)
>   {
>   	struct misc_bios_flags_structure *flags =
>   	container_of(dm, struct misc_bios_flags_structure, header);
> @@ -281,17 +287,21 @@ static void parse_b1_table(const struct dmi_header *dm)
>   	/* 4 bytes header, 8 bytes flags */
>   	if (dm->length < 12)
>   		return;
> -	if (dm->handle != 0xb100)
> -		return;
> -	if ((flags->flags0 & FLAG_HAS_ACPI_WMI))
> -		wmi_supported = 1;
> +
> +	search->count++;
> +	if (dm->handle == 0xb100) {
> +		search->found_b100 = true;
> +		search->flags0 = flags->flags0;
> +	} else if (!search->found_b100) {
> +		search->flags0 = flags->flags0;
> +	}
>   }
>   
> -static void find_b1(const struct dmi_header *dm, void *dummy)
> +static void find_b1(const struct dmi_header *dm, void *data)
>   {
>   	switch (dm->type) {
>   	case 0xb1: /* misc bios flags */
> -		parse_b1_table(dm);
> +		parse_b1_table(dm, data);
>   		break;
>   	}
>   }
> @@ -308,7 +318,18 @@ static struct wmi_driver dell_smbios_wmi_driver = {
>   
>   int init_dell_smbios_wmi(void)
>   {
> -	dmi_walk(find_b1, NULL);
> +	struct b1_search search = {};
> +
> +	dmi_walk(find_b1, &search);
> +
> +	/*
> +	 * Dell x86 firmware places the misc BIOS flags at handle 0xb100. However,
> +	 * with RTX Spark, it is not at handle 0xb100, so fall back to the only type
> +	 * 0xb1 handle present if there is only one.
> +	 */
> +	if ((search.found_b100 || search.count == 1) &&
> +	    (search.flags0 & FLAG_HAS_ACPI_WMI))
> +		wmi_supported = 1;
>   
>   	if (!wmi_supported)
>   		return -ENODEV;

  reply	other threads:[~2026-11-21 13:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21  0:05 [PATCH 0/8] platform: dell: Move out of x86 and support Dell XPS 16 Creator Edition Brian Mak
2026-11-21  0:05 ` [PATCH 1/8] platform/x86: dell: Make uart-backlight x86 only Brian Mak
2026-11-21  1:36   ` Randy Dunlap
2026-11-21  1:36     ` Randy Dunlap
2026-11-21  0:05 ` [PATCH 2/8] platform: dell: Move out of x86 directory Brian Mak
2026-11-21 10:05   ` kernel test robot
2026-11-21  0:05 ` [PATCH 3/8] MAINTAINERS: Add Dell platform drivers entry Brian Mak
2026-11-21  0:05 ` [PATCH 4/8] platform: dell: Allow DELL_LAPTOP to be arch-independent Brian Mak
2026-11-21  0:48   ` Pali Rohár
2026-11-21  1:38   ` Randy Dunlap
2026-11-21  0:05 ` [PATCH 5/8] platform: dell: smbios-wmi: Fix probe on RTX Spark Brian Mak
2026-11-21 13:44   ` Armin Wolf [this message]
2026-11-21  0:05 ` [PATCH 6/8] platform: dell: smbios: Add quirk for non-functional calling interface Brian Mak
2026-11-21  0:38   ` Pali Rohár
2026-11-21  0:45     ` Brian Mak
2026-11-21  0:51       ` Pali Rohár
2026-11-21 13:49   ` Armin Wolf
2026-11-21  0:05 ` [PATCH 7/8] platform: dell: laptop: Don't load if SMBIOS calls are non-functional Brian Mak
2026-11-21  0:05 ` [PATCH 8/8] platform: dell: pc: " Brian Mak

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=77d84196-1e9a-46ef-835a-56275087631c@gmx.de \
    --to=w_armin@gmx.de \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=bmak@nvidia.com \
    --cc=corbet@lwn.net \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kuurtb@gmail.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 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®