Skip to contentSkip to conversation

platform/x86: dell-sysman: add support for alienware products

PATCH Superseded Crag Wang 6 participants 9 messages Sep 23, 2024 – Oct 8, 2024

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Crag Wang

author
#0 lore raw

PATCH 1/1 platform/x86: dell-sysman: add support for alienware products

Use SMBIOS Type 1 manfacturer instead OEM strings to verify product compatibility. Also, add Alienware products to the support scope.

---
 .../x86/dell/dell-wmi-sysman/sysman.c         | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +17 -2
index 9def7983d7d6..2f3f7e307b29 100644
@@ -516,12 +516,27 @@ static int init_bios_attributes(int attr_type, const char *guid)
 	return retval;
 }
 
+static const struct dmi_system_id sysman_dev_table[] __initconst = {
+	{
+		.ident = "Dell Inc.",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+		},
+	},
+	{
+		.ident = "Alienware",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
+		},
+	},
+	{}
+};
+
 static int __init sysman_init(void)
 {
 	int ret = 0;
 
-	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+	if (!dmi_check_system(sysman_dev_table)) {
 		pr_err("Unable to run on non-Dell system\n");
 		return -ENODEV;
 	}
Signature · 1 line
2.43.0
#1 lore raw
Quoted 2 lines · Crag Wang

Use SMBIOS Type 1 manfacturer instead OEM strings to verify product compatibility. Also, add Alienware products to the support scope.

Alienware systems don't use OEM string "Dell System"? TIL.

Quoted 27 lines
---
  .../x86/dell/dell-wmi-sysman/sysman.c         | 19 +++++++++++++++++--
  1 file changed, 17 insertions(+), 2 deletions(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +13 -0
index 9def7983d7d6..2f3f7e307b29 100644
@@ -516,12 +516,27 @@ static int init_bios_attributes(int attr_type, const char *guid)
  	return retval;
  }
 
+static const struct dmi_system_id sysman_dev_table[] __initconst = {
+	{
+		.ident = "Dell Inc.",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+		},
+	},
+	{
+		.ident = "Alienware",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
+		},
+	},

drivers/platform/x86/dell/dell-wmi-sysman/sysman.c static int init_bios_attributes(int attr_type, const char *guid) · line 539

Quoted 10 lines
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +4 -2
+	{}
+};
+
  static int __init sysman_init(void)
  {
  	int ret = 0;
 
-	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+	if (!dmi_check_system(sysman_dev_table)) {

Would it perhaps make sense to be an && condition instead of remove the dmi_find_device() conditions?

IE:

if (!dmi_find_device() && !dmi_find_device() && !dmi_check_system())

Then you can continue to cover anything that has been rebranded too.

Quoted 3 lines
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +0 -0
  		pr_err("Unable to run on non-Dell system\n");
  		return -ENODEV;
  	}
#2 lore raw
Quoted 10 lines

Would it perhaps make sense to be an && condition instead of remove the dmi_find_device() conditions?

IE:

if (!dmi_find_device() && !dmi_find_device() && !dmi_check_system())

Then you can continue to cover anything that has been rebranded too.

I will do v2 to add the new string and remove the URL check to accommodate the OEM use case.

Internal Use - Confidential

maintainer
#3 lore raw
In reply to Mario Limonciello
Quoted 1 line

[EXTERNAL EMAIL]

Internal Use - Confidential

Quoted 4 lines · Crag Wang

Use SMBIOS Type 1 manfacturer instead OEM strings to verify product compatibility. Also, add Alienware products to the support scope.

Alienware systems don't use OEM string "Dell System"? TIL.

If the system is Dell-developed, the string value is “Dell Inc.”. System management software can identify a Dell system by checking for “Dell ” as the first five characters of this string. Alienware systems should show “Alienware”. This is according to the Dell implementation of SMBIOS.

Quoted 39 lines
---
  .../x86/dell/dell-wmi-sysman/sysman.c         | 19 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---
  1 file changed, 17 insertions(+-), 2 deletions(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -1
index 9def7983d7d6..2f3f7e307b29 100644
--- a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
+-+-+- b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c

@@ -516,12 +-516,27 @@ static int init_bios_attributes(int attr_type, const char *guid)

      return retval;

}

+-static const struct dmi_system_id sysman_dev_table[] __initconst = {
+-     {
+-             .ident = "Dell Inc.",
+-             .matches = {
+-                     DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+-             },
+-     },
+-     {
+-             .ident = "Alienware",
+-             .matches = {
+-                     DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
+-             },
+-     },
+-     {}
+-};
+-
  static int __init sysman_init(void)
  {
      int ret = 0;
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -2
-     if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-         !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+-     if (!dmi_check_system(sysman_dev_table)) {
Quoted 2 lines

Would it perhaps make sense to be an && condition instead of remove the dmi_find_device() conditions?

Agreed on this.

Quoted 9 lines

IE:

if (!dmi_find_device() && !dmi_find_device() && !dmi_check_system())

Then you can continue to cover anything that has been rebranded too.

              pr_err("Unable to run on non-Dell system\n");
              return -ENODEV;
      }
author
#4 lore raw

PATCH v2 1/1 platform/x86: dell-sysman: add support for alienware products

In reply to Crag Wang

Remove the URL check and add alienware string for broader support.

---
 drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -1
index 9def7983d7d6..68c63e1fbd27 100644
@@ -521,7 +521,7 @@ static int __init sysman_init(void)
 	int ret = 0;
 
 	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL)) {
 		pr_err("Unable to run on non-Dell system\n");
 		return -ENODEV;
 	}
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#5 lore raw
Quoted 4 lines · Crag Wang

Remove the URL check and add alienware string for broader support.

---

Quoted 16 lines
  drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -1
index 9def7983d7d6..68c63e1fbd27 100644
@@ -521,7 +521,7 @@ static int __init sysman_init(void)
  	int ret = 0;
 
  	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL)) {
  		pr_err("Unable to run on non-Dell system\n");
  		return -ENODEV;
  	}
Reviewed-by Mario Limonciello
#6 lore raw

Hi,

Internal Use - Confidential
-----Original Message-----
From: Mario Limonciello <[email protected]>
Sent: Tuesday, September 24, 2024 4:24 PM

Quoted 1 line · Crag Wang

Remove the URL check and add alienware string for broader support.

Couple of newbie questions: what's the reason for dropping the URL check? Would it make sense to include the reason in the commit msg?

---
Thanks & Best Regards, Laurentiu

Quoted 2 lines

---

Quoted 16 lines
  drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 +--
  1 file changed, 1 insertion(+-), 1 deletion(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -1
index 9def7983d7d6..68c63e1fbd27 100644
--- a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
+-+-+- b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c

@@ -521,7 +-521,7 @@ static int __init sysman_init(void)

      int ret = 0;

      if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-         !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+-         !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL)) {
              pr_err("Unable to run on non-Dell system\n");
              return -ENODEV;
      }
#7 lore raw
Quoted 4 lines

Couple of newbie questions: what's the reason for dropping the URL check? Would it make sense to include the reason in the commit msg?

URL in type 11 is subject to change according to OEM ID Module specification, for standard Dell and OEM inclusive the string 'Dell System' should be sufficient.

Crag

Internal Use - Confidential

maintainer
#8 lore raw
Quoted 5 lines · Crag
Quoted 2 lines

Couple of newbie questions: what's the reason for dropping the URL check? Would it make sense to include the reason in the commit msg?

URL in type 11 is subject to change according to OEM ID Module specification, for standard Dell and OEM inclusive the string 'Dell System' should be sufficient.

Please add such information into the commit message so it gets properly recorded. But I'd prefer this to be split into two patches, one adding the Alienware and another that removes the URL making it easier to revert only the latter one if the need arises.

Signature · 1 line
 i.
Quoted 1 line

Internal Use - Confidential