Message ID | 20230525193132.3727-3-mpearson-lenovo@squebb.ca |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp727198rwl; Thu, 25 May 2023 12:46:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4D8fdWFGtSdtCu+1FAyBN8MhvCHPbCB/hXLZ5yWqgcFtnTmPKeQgBCf9wwFLY5tpqWhXGO X-Received: by 2002:a17:90a:8ce:b0:24b:7618:2d16 with SMTP id 14-20020a17090a08ce00b0024b76182d16mr3192119pjn.31.1685043999053; Thu, 25 May 2023 12:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685043999; cv=none; d=google.com; s=arc-20160816; b=endZmKdpXwkRIihjmtqdxidt8ymjJUGn5hkMz7PwAZ6zQVcGqvLanjKNr9Mf0vt7FR Wpx3ZaPDE/9otIpfgqfji0vnYO0LzgZX46uLqytQQtgZueqeL5Pq9PqzDeMm1KS3ydIV Lx/x48UrfjM/G6kVsBoqBo3rVNWAg0Lpxe0MgoMbqCt7xGu7LTZ9R/PfkCaTp75MaIRH OuLVwPICaMmXkcmvJOD4lx50R9YqFCn+fz7e5F2UHdjMCDywgHWBtXsRWANYS3tCvwCY kUpPB0PlFqaASspZoUISjyaXBhAxuVXPhoPfAxpllf4XUMwJrdpiyR8dFlY0Gx8ca3Cm zZpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=/PlZsAh2PqLyxP7nKoIuoVm4Q+hIJHqGY7bemnqtU0s=; b=Y8Nb/Og/wfLIp63t7mPqwRm9CCR8sySO52WkCY2iVWmy47T6Ymtz7at4K2jbN4/MF1 jJlDjPlSzQpD3Z7KuLJQCjelqmLKbJt56NYvjwZhUcHhbrsrkwt8F2KE8z8Oo/oOgEhz S/6MMyZi0EPJxQlF9JGsnPyXe2K/qsxkWPKlQ6ovABepss76I79FQTT0f2c4Pvp6/yDE FIQkt39C0ia0Wd4Zl9YYjHyY/KRjjoX6QRQBk8LEuJq54YFrfeqfh1s3Y+NGUdwOIGgI gOxSyU+SAa90NJp2dLWnoxVfdKSk/QGPWLWZUzHl9aik7OdMG9Oq+R6xf32LpZY06tmn 7kzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=THNgAn0W; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=uzALnOWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk18-20020a17090b4a1200b0025072690087si2497398pjb.7.2023.05.25.12.46.26; Thu, 25 May 2023 12:46:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=THNgAn0W; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=uzALnOWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbjEYTdm (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Thu, 25 May 2023 15:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240138AbjEYTdh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 25 May 2023 15:33:37 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1ED1E6F; Thu, 25 May 2023 12:32:59 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5AA5C5C01E0; Thu, 25 May 2023 15:31:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 25 May 2023 15:31:37 -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=1685043097; x= 1685129497; bh=/PlZsAh2PqLyxP7nKoIuoVm4Q+hIJHqGY7bemnqtU0s=; b=T HNgAn0WGCwfIg3mv2F04i+N53xkJomReivfd2qvb6aTW9ddBOvGXiYwBIRtPfJfU bD3I/JOxPPolUr/CTzMDXuTLF+F3iWAeddO5hTTnn0ORt0xhVtmk7W6dGvAbp637 5x4/+2eltd0fzwzotdy4qXhrvdO5wnFYlfe/L+GcBhAquqso+kt+fZpgGLewmYUR cNziPS2BxFPWxOO6I4PN+4taEMsl0e+EK+BQUGhruUZbmrQGQ4EuGlaJwJcCNuTq Ikt5FMEoRQS+9NYmbsAy5l/6dFV5/4x0bQRjll2RE1WuAivlWDKlweLfDNs1FtJv mw7/fUlblSktu5In5WxdA== 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=1685043097; x= 1685129497; bh=/PlZsAh2PqLyxP7nKoIuoVm4Q+hIJHqGY7bemnqtU0s=; b=u zALnOWf41Icac+jiYTnhJRqO0InA2TLlxOqrDOxlrlZMchAAlJwH4ytDmefjJyBL uVdp6kZVKeWs9BsA8M5/i+vLY97YtB1qRx6PeUN7EKF3f51gFxNmYIFcNjZ/3Zov CXn6mCn0a9Rf8aE8clrk6EJrdf94iErMaHyrHCluFuy/pdvxqN7bwrJ8pU24VvJh va7uR0suCZllXPrQXTKMDuoaNLeSyLB9WxEZi3afVSBa7+b+AyRS4zH5lX/ATWXE VGMFrM0hsz0LvO2/pVLQa2zK2M2iSFEovMiOEoL0AyxERUgFAjEDRCOloAX09D19 40NPXjGdEFRH1VqCilM3g== X-ME-Sender: <xms:mbdvZANQPPWh-flk1SZvDX0euRK40s2yeosk6-IzCH-5SHPLVc_hPA> <xme:mbdvZG_fSj9Ejh9PUZ0dGfqHjWWYD1arnnYlSf9tiraRL_uiINy7P7Wyh-LbZnbmM iD5DngSUa3_WEX0HCM> X-ME-Received: <xmr:mbdvZHQ0U2uZmq3VKVc2SXmlvapat-UHBHWmwpiSAtaCqVD1LbqvSVZhyWE5_Ys4jxK0r8SzfZmXiwBUcM04TDGgqFOn1h4Usyz21yyrlq-CZ-jau6liDRwJWQ> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejjedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: <xmx:mbdvZIv5YKudsRLDFZGrHD18Jw2iE6W3zeRwwXAAj6x32r8Pz2VlBQ> <xmx:mbdvZIfm5OqbnLk2FfzXG9lV5QPWB8idGRS9phAUHhjtcRVHLP_8nw> <xmx:mbdvZM0N7sE8Zj7cDsf3v_ZngQEfaUulJRVdENhYV9fM02583xJq4g> <xmx:mbdvZA6AixF6eX8Ji8SdZtbHuYzEA7sDvGTRMPiA59-Qh5FRl_hMJA> Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 May 2023 15:31:36 -0400 (EDT) From: Mark Pearson <mpearson-lenovo@squebb.ca> To: mpearson-lenovo@squebb.ca Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] platform/x86: think-lmi: Correct NVME password handling Date: Thu, 25 May 2023 15:31:30 -0400 Message-Id: <20230525193132.3727-3-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230525193132.3727-1-mpearson-lenovo@squebb.ca> References: <mpearson-lenovo@squebb.ca> <20230525193132.3727-1-mpearson-lenovo@squebb.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766167450796745109?= X-GMAIL-MSGID: =?utf-8?q?1766896696446112591?= |
Series |
[1/5] platform/x86: think-lmi: Enable opcode support on BIOS settings
|
|
Commit Message
Mark Pearson
May 25, 2023, 7:31 p.m. UTC
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.
Also cleaned up so the index is set to a default of 1 rather than 0
as this just makes more sense (there is no device 0).
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
---
Changes in V2: None. Version bumped in series
drivers/platform/x86/think-lmi.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Comments
Hi Hans, My apologies - I completely forgot to add the v2 tag on this patch series...had a complete brain fart. I assume I should resend them all - correctly named. I also have no idea why they showed up out of order...I'm blaming that one on the email server. Sorry :( Mark On Thu, May 25, 2023, at 3:31 PM, Mark Pearson wrote: > 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. > > Also cleaned up so the index is set to a default of 1 rather than 0 > as this just makes more sense (there is no device 0). > > Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> > --- > Changes in V2: None. Version bumped in series > > drivers/platform/x86/think-lmi.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c > index c7e98fbe7c3d..1c02958035ad 100644 > --- a/drivers/platform/x86/think-lmi.c > +++ b/drivers/platform/x86/think-lmi.c > @@ -456,9 +456,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); > } > @@ -1524,6 +1524,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 || > -- > 2.40.1
Hi, On 5/25/23 21:39, Mark Pearson wrote: > Hi Hans, > > My apologies - I completely forgot to add the v2 tag on this patch series...had a complete brain fart. No worries I did not even notice the v2 was missing, my brain automatically added it :) > I assume I should resend them all - correctly named. Well I have some review remarks on patch 5/5, it would be good if you can address those (if you agree with them) and then lets jump straight to v3 to avoid confusion ? > I also have no idea why they showed up out of order...I'm blaming that one on the email server. The out of order thing is normal, this sometimes happens with email. > Sorry :( Again no worries / no problem ... Regards, Hans > On Thu, May 25, 2023, at 3:31 PM, Mark Pearson wrote: >> 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. >> >> Also cleaned up so the index is set to a default of 1 rather than 0 >> as this just makes more sense (there is no device 0). >> >> Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> >> --- >> Changes in V2: None. Version bumped in series >> >> drivers/platform/x86/think-lmi.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c >> index c7e98fbe7c3d..1c02958035ad 100644 >> --- a/drivers/platform/x86/think-lmi.c >> +++ b/drivers/platform/x86/think-lmi.c >> @@ -456,9 +456,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); >> } >> @@ -1524,6 +1524,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 || >> -- >> 2.40.1 >
On Thu, May 25, 2023, at 3:43 PM, Hans de Goede wrote: > Hi, > > On 5/25/23 21:39, Mark Pearson wrote: >> Hi Hans, >> >> My apologies - I completely forgot to add the v2 tag on this patch series...had a complete brain fart. > > No worries I did not even notice the v2 was missing, > my brain automatically added it :) > >> I assume I should resend them all - correctly named. > > Well I have some review remarks on patch 5/5, it would be good if you > can address those (if you agree with them) and then lets jump straight > to v3 to avoid confusion ? > Works for me :) Mark
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index c7e98fbe7c3d..1c02958035ad 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -456,9 +456,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); } @@ -1524,6 +1524,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 ||