Skip to content

Commit 97eef59

Browse files
mrhpearsonjwrdegoede
authored andcommitted
platform/x86: think-lmi: Correct System password interface
The system password identification was incorrect. This means that if the password was enabled it wouldn't be detected correctly; and setting it would not work. Also updated code to use TLMI_SMP_PWD instead of TLMI_SYS_PWD to be in sync with Lenovo documentation. Fixes: 640a5fa ("platform/x86: think-lmi: Opcode support") Signed-off-by: Mark Pearson <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 4ca9c3d commit 97eef59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/platform/x86/think-lmi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ MODULE_PARM_DESC(debug_support, "Enable debug command support");
172172
#define TLMI_POP_PWD (1 << 0)
173173
#define TLMI_PAP_PWD (1 << 1)
174174
#define TLMI_HDD_PWD (1 << 2)
175-
#define TLMI_SYS_PWD (1 << 3)
175+
#define TLMI_SMP_PWD (1 << 6) /* System Management */
176176
#define TLMI_CERT (1 << 7)
177177

178178
#define to_tlmi_pwd_setting(kobj) container_of(kobj, struct tlmi_pwd_setting, kobj)
@@ -1519,11 +1519,11 @@ static int tlmi_analyze(void)
15191519
tlmi_priv.pwd_power->valid = true;
15201520

15211521
if (tlmi_priv.opcode_support) {
1522-
tlmi_priv.pwd_system = tlmi_create_auth("sys", "system");
1522+
tlmi_priv.pwd_system = tlmi_create_auth("smp", "system");
15231523
if (!tlmi_priv.pwd_system)
15241524
goto fail_clear_attr;
15251525

1526-
if (tlmi_priv.pwdcfg.core.password_state & TLMI_SYS_PWD)
1526+
if (tlmi_priv.pwdcfg.core.password_state & TLMI_SMP_PWD)
15271527
tlmi_priv.pwd_system->valid = true;
15281528

15291529
tlmi_priv.pwd_hdd = tlmi_create_auth("hdd", "hdd");

0 commit comments

Comments
 (0)