From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91B718F74 for ; Sun, 16 Jul 2023 20:15:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1770FC433C7; Sun, 16 Jul 2023 20:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689538551; bh=l3BnC9lTfNA0mw2u8w+KVqo7jzgA9BlHXG6sq0MJOlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MI3gUpVfOlkcQ0RnLcQUtHobQ9t/NsOVDBCDiF3zB5PmsfitsvrhqjBrE1yHSgky0 NnD3kKHuQBE83xyZWSkAjSxJR0DNuvSbIJoMHwQ7n81YJQyj5UbX6UeWySgT9LJX5s l63iKQdWQU7Vl2hPpDmJ8qw6sZ8+VwO9JwxzU8kg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mark Pearson , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Hans de Goede , Sasha Levin Subject: [PATCH 6.4 460/800] platform/x86: think-lmi: Correct NVME password handling Date: Sun, 16 Jul 2023 21:45:13 +0200 Message-ID: <20230716194959.766033352@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230716194949.099592437@linuxfoundation.org> References: <20230716194949.099592437@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Mark Pearson [ Upstream commit 4cebb42412248d28df6de01420cfac5654428d41 ] NVME passwords identifier have been standardised across the Lenovo systems and now use udrp and adrp (user and admin level) instead of unvp and mnvp. This should apparently be backwards compatible. Fixes: 640a5fa50a42 ("platform/x86: think-lmi: Opcode support") Signed-off-by: Mark Pearson Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230601200552.4396-6-mpearson-lenovo@squebb.ca Signed-off-by: Hans de Goede Signed-off-by: Sasha Levin --- drivers/platform/x86/think-lmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index e6060aa2f7953..e4047ee0a7546 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -461,9 +461,9 @@ static ssize_t new_password_store(struct kobject *kobj, sprintf(pwd_type, "mhdp%d", setting->index); } else if (setting == tlmi_priv.pwd_nvme) { if (setting->level == TLMI_LEVEL_USER) - sprintf(pwd_type, "unvp%d", setting->index); + sprintf(pwd_type, "udrp%d", setting->index); else - sprintf(pwd_type, "mnvp%d", setting->index); + sprintf(pwd_type, "adrp%d", setting->index); } else { sprintf(pwd_type, "%s", setting->pwd_type); } -- 2.39.2