Commit 3206001f authored by Mark Pearson's avatar Mark Pearson Committed by Hans de Goede
Browse files

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: default avatarMark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230601200552.4396-7-mpearson-lenovo@squebb.ca


Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 4cebb424
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -243,8 +243,8 @@ Description:

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

		certificate, signature, save_signature:
					These attributes are used for certificate based authentication. This is
+4 −0
Original line number Diff line number Diff line
@@ -1534,6 +1534,10 @@ static int tlmi_analyze(void)
		if (!tlmi_priv.pwd_nvme)
			goto fail_clear_attr;

		/* Set default hdd/nvme index to 1 as there is no device 0 */
		tlmi_priv.pwd_hdd->index = 1;
		tlmi_priv.pwd_nvme->index = 1;

		if (tlmi_priv.pwdcfg.core.password_state & TLMI_HDD_PWD) {
			/* Check if PWD is configured and set index to first drive found */
			if (tlmi_priv.pwdcfg.ext.hdd_user_password ||