All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: dell-sysman: add support for alienware products
@ 2024-09-23  6:36 Crag Wang
  2024-09-23 13:27 ` Mario Limonciello
  2024-09-24  5:02 ` [PATCHv2 1/1] " Crag Wang
  0 siblings, 2 replies; 9+ messages in thread
From: Crag Wang @ 2024-09-23  6:36 UTC (permalink / raw)
  To: prasanth.ksr, hdegoede, Dell.Client.Kernel
  Cc: LKML, platform-driver-x86, Crag Wang

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

Signed-off-by: Crag Wang <crag_wang@dell.com>
---
 .../x86/dell/dell-wmi-sysman/sysman.c         | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
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;
 
-	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;
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] platform/x86: dell-sysman: add support for alienware products
  2024-09-23  6:36 [PATCH] platform/x86: dell-sysman: add support for alienware products Crag Wang
@ 2024-09-23 13:27 ` Mario Limonciello
  2024-09-24  0:45   ` Wang, Crag
  2024-10-08  4:31   ` Ksr, Prasanth
  2024-09-24  5:02 ` [PATCHv2 1/1] " Crag Wang
  1 sibling, 2 replies; 9+ messages in thread
From: Mario Limonciello @ 2024-09-23 13:27 UTC (permalink / raw)
  To: Crag Wang, prasanth.ksr, hdegoede, Dell.Client.Kernel
  Cc: LKML, platform-driver-x86, Crag Wang

On 9/23/2024 01:36, Crag Wang wrote:
> 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.

> 
> Signed-off-by: Crag Wang <crag_wang@dell.com>
> ---
>   .../x86/dell/dell-wmi-sysman/sysman.c         | 19 +++++++++++++++++--
>   1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
> 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;
>   
> -	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.

>   		pr_err("Unable to run on non-Dell system\n");
>   		return -ENODEV;
>   	}


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] platform/x86: dell-sysman: add support for alienware products
  2024-09-23 13:27 ` Mario Limonciello
@ 2024-09-24  0:45   ` Wang, Crag
  2024-10-08  4:31   ` Ksr, Prasanth
  1 sibling, 0 replies; 9+ messages in thread
From: Wang, Crag @ 2024-09-24  0:45 UTC (permalink / raw)
  To: Mario Limonciello, Crag Wang, Ksr, Prasanth, hdegoede@redhat.com,
	Dell Client Kernel
  Cc: LKML, platform-driver-x86@vger.kernel.org

>
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCHv2 1/1] platform/x86: dell-sysman: add support for alienware products
  2024-09-23  6:36 [PATCH] platform/x86: dell-sysman: add support for alienware products Crag Wang
  2024-09-23 13:27 ` Mario Limonciello
@ 2024-09-24  5:02 ` Crag Wang
  2024-09-24 13:24   ` Mario Limonciello
  1 sibling, 1 reply; 9+ messages in thread
From: Crag Wang @ 2024-09-24  5:02 UTC (permalink / raw)
  To: mario.limonciello, Prasanth Ksr, Hans de Goede,
	Ilpo Järvinen
  Cc: crag.wang, Crag Wang, Dell.Client.Kernel, platform-driver-x86,
	linux-kernel

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

Signed-off-by: Crag Wang <crag_wang@dell.com>
---
 drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
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;
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCHv2 1/1] platform/x86: dell-sysman: add support for alienware products
  2024-09-24  5:02 ` [PATCHv2 1/1] " Crag Wang
@ 2024-09-24 13:24   ` Mario Limonciello
  2024-09-24 14:34     ` Tudor, Laurentiu
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Limonciello @ 2024-09-24 13:24 UTC (permalink / raw)
  To: Crag Wang, Prasanth Ksr, Hans de Goede, Ilpo Järvinen
  Cc: crag.wang, Crag Wang, Dell.Client.Kernel, platform-driver-x86,
	linux-kernel

On 9/24/2024 00:02, Crag Wang wrote:
> Remove the URL check and add alienware string for broader support.
> 
> Signed-off-by: Crag Wang <crag_wang@dell.com>
> ---
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
>   drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
> 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;
>   	}


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCHv2 1/1] platform/x86: dell-sysman: add support for alienware products
  2024-09-24 13:24   ` Mario Limonciello
@ 2024-09-24 14:34     ` Tudor, Laurentiu
  2024-09-24 14:42       ` Wang, Crag
  0 siblings, 1 reply; 9+ messages in thread
From: Tudor, Laurentiu @ 2024-09-24 14:34 UTC (permalink / raw)
  To: Mario Limonciello, Crag Wang, Ksr, Prasanth, Hans de Goede,
	Ilpo Järvinen
  Cc: Wang, Crag, Wang, Crag, Dell Client Kernel,
	platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org

Hi,


Internal Use - Confidential
-----Original Message-----
From: Mario Limonciello <mario.limonciello@amd.com>
Sent: Tuesday, September 24, 2024 4:24 PM

On 9/24/2024 00:02, Crag Wang wrote:
> 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

> Signed-off-by: Crag Wang <crag_wang@dell.com>
> ---
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
>   drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
> 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;
>       }


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCHv2 1/1] platform/x86: dell-sysman: add support for alienware products
  2024-09-24 14:34     ` Tudor, Laurentiu
@ 2024-09-24 14:42       ` Wang, Crag
  2024-10-03 11:03         ` Ilpo Järvinen
  0 siblings, 1 reply; 9+ messages in thread
From: Wang, Crag @ 2024-09-24 14:42 UTC (permalink / raw)
  To: Tudor, Laurentiu, Mario Limonciello, Crag Wang, Ksr, Prasanth,
	Hans de Goede, Ilpo Järvinen
  Cc: Dell Client Kernel, platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, Wang, Berry

>
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCHv2 1/1] platform/x86: dell-sysman: add support for alienware products
  2024-09-24 14:42       ` Wang, Crag
@ 2024-10-03 11:03         ` Ilpo Järvinen
  0 siblings, 0 replies; 9+ messages in thread
From: Ilpo Järvinen @ 2024-10-03 11:03 UTC (permalink / raw)
  To: Wang, Crag
  Cc: Tudor, Laurentiu, Mario Limonciello, Crag Wang, Ksr, Prasanth,
	Hans de Goede, Dell Client Kernel,
	platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org,
	Wang, Berry

On Tue, 24 Sep 2024, Wang, Crag wrote:

> > 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.

-- 
 i.

> Internal Use - Confidential


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] platform/x86: dell-sysman: add support for alienware products
  2024-09-23 13:27 ` Mario Limonciello
  2024-09-24  0:45   ` Wang, Crag
@ 2024-10-08  4:31   ` Ksr, Prasanth
  1 sibling, 0 replies; 9+ messages in thread
From: Ksr, Prasanth @ 2024-10-08  4:31 UTC (permalink / raw)
  To: Limonciello, Mario, Crag Wang, hdegoede@redhat.com,
	Dell Client Kernel
  Cc: LKML, platform-driver-x86@vger.kernel.org, Wang, Crag

> [EXTERNAL EMAIL]


Internal Use - Confidential
On 9/23/2024 01:36, Crag Wang wrote:
> 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.

>
> Signed-off-by: Crag Wang <crag_wang@dell.com>
> ---
>   .../x86/dell/dell-wmi-sysman/sysman.c         | 19 +++++++++++++++++--
>   1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
> b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
> 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;
>
> -     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?

Agreed on this.

> 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;
>       }


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-10-08  4:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23  6:36 [PATCH] platform/x86: dell-sysman: add support for alienware products Crag Wang
2024-09-23 13:27 ` Mario Limonciello
2024-09-24  0:45   ` Wang, Crag
2024-10-08  4:31   ` Ksr, Prasanth
2024-09-24  5:02 ` [PATCHv2 1/1] " Crag Wang
2024-09-24 13:24   ` Mario Limonciello
2024-09-24 14:34     ` Tudor, Laurentiu
2024-09-24 14:42       ` Wang, Crag
2024-10-03 11:03         ` Ilpo Järvinen

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.