From patchwork Thu Jun 1 20:05:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Pearson X-Patchwork-Id: 13264416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10583C77B7E for ; Thu, 1 Jun 2023 20:06:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231794AbjFAUGJ (ORCPT ); Thu, 1 Jun 2023 16:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbjFAUGG (ORCPT ); Thu, 1 Jun 2023 16:06:06 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6196195; Thu, 1 Jun 2023 13:06:05 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id CF49A32001FC; Thu, 1 Jun 2023 16:06:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 01 Jun 2023 16:06:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1685649964; x= 1685736364; bh=Gu+WlP+2bsePT/P2fB0521Gn91OZaDLXsUxYcTQ73gA=; b=G CLKakvDROosoZIhS9uesLtHiY9/K2xF8wnhlA7pr72YLGFl4XMm9Vwpf8kU8YZ4w VLB4eWcz7DVNGF/wreqhbYtIm+kFDGmwNj6BMb715x+wIS+tLKxqI/XgeCeJ7G+e plfGTCbL5hCI3ygPcDSdGR5ftBUFqFvsuB6VlfU6WvYBGInAwPM+fiOQ6rbTY+WC YCsOGsLJO9pRylC+TTJgO8CFmY9PSlWG6JmtsKyPRqk2Q2bXAZ8Ix9F+3eYMSLd4 jOoPD/EiUMo43YMLlHdL5+Eecrvqdcfpj4FUJxZUg7pjSEBFBPFd9Sz8Z5QbANNy U+t3QjZ3G8jEtCkGTFnPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1685649964; x= 1685736364; bh=Gu+WlP+2bsePT/P2fB0521Gn91OZaDLXsUxYcTQ73gA=; b=u iWm9XttH9QCd4fTbstd2YQ8a81N5ltimJSHXQEryNcSEoAEK42t0BijgHYKp3wC+ 1KEnkoh4ZHfAS99NfNG3Jx7cPwGFBcr6L65ARWvqg2SxoWs9SQpbiQUlXlVKoZ4t UwUG1ZN/YwkXFmXOYjGOB2tK5Q0qIIRwvEBo0LKsuuRdMzgDpCRcMBRsEJQG/YiN zt3hKlf8yB9nRu/6WIcKt6bwNJVRC61Wdyk4JCgXq9a+7riEjj8LWvZqUWAd6hTM 4qt6EQAV13GF/nIXGuIdqfmDCGRLu7JdzsHOLAKFxlowVKbKGR7fOgSZmaTQVoGi fx7OELSOEpNhB9At+50kA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeluddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Jun 2023 16:06:03 -0400 (EDT) From: Mark Pearson To: mpearson-lenovo@squebb.ca Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, ilpo.jarvinen@linux.intel.com Subject: [PATCH v4 6/8] platform/x86: think-lmi: Correct NVME password handling Date: Thu, 1 Jun 2023 16:05:50 -0400 Message-Id: <20230601200552.4396-6-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230601200552.4396-1-mpearson-lenovo@squebb.ca> References: <20230601200552.4396-1-mpearson-lenovo@squebb.ca> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org 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 --- Changes in v2 & v3: - None. Version bumped in series. Changes in v4: - This patch was previously #2 and is now #6 in series. - index default change split into new patch (next in series). 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 e3be99b44ce0..71bbe169c77e 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); }