platform/x86: dell-sysman: add support for alienware products
Subsystems (2)
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
@@ -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
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
Signed-off-by Crag Wang <[email protected]>--- .../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@@ -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
-0pr_err ("Unable to run on non-Dell system\n" );return -ENODEV ; }
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
Ksr, Prasanth
maintainerQuoted 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
Signed-off-by Crag Wang <[email protected]>--- .../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--- 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; }
PATCH v2 1/1 platform/x86: dell-sysman: add support for alienware products
In reply to Crag WangRemove 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
@@ -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
Quoted 4 lines · Crag Wang
Remove the URL check and add alienware string for broader support.
Signed-off-by Crag Wang <[email protected]>---
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@@ -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 ; }
Tudor, Laurentiu
Reviewed-by Mario LimoncielloHi,
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
Signed-off-by Crag Wang <[email protected]>---
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--- 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
__initsysman_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; }
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
Ilpo Järvinen
maintainerQuoted 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