Skip to content

Commit 3206001

Browse files
mrhpearsonjwrdegoede
authored andcommitted
platform/x86: think-lmi: Correct NVME index default
The NVME/HDD index used by WMI starts at 1 so corrected the default appropriately. Note, zero index is still permitted in case it is required on future platforms. Documentation updated correspondingly 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 4cebb42 commit 3206001

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Documentation/ABI/testing/sysfs-class-firmware-attributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ Description:
243243

244244
index:
245245
Used with HDD and NVME authentication to set the drive index
246-
that is being referenced (e.g hdd0, hdd1 etc)
247-
This attribute defaults to device 0.
246+
that is being referenced (e.g hdd1, hdd2 etc)
247+
This attribute defaults to device 1.
248248

249249
certificate, signature, save_signature:
250250
These attributes are used for certificate based authentication. This is

drivers/platform/x86/think-lmi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,10 @@ static int tlmi_analyze(void)
15341534
if (!tlmi_priv.pwd_nvme)
15351535
goto fail_clear_attr;
15361536

1537+
/* Set default hdd/nvme index to 1 as there is no device 0 */
1538+
tlmi_priv.pwd_hdd->index = 1;
1539+
tlmi_priv.pwd_nvme->index = 1;
1540+
15371541
if (tlmi_priv.pwdcfg.core.password_state & TLMI_HDD_PWD) {
15381542
/* Check if PWD is configured and set index to first drive found */
15391543
if (tlmi_priv.pwdcfg.ext.hdd_user_password ||

0 commit comments

Comments
 (0)