Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3041516rwd; Mon, 29 May 2023 05:05:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xUhrza3KyjngoNosViOPgE2nkerMX3hj6gOfYFvibQIJ7WuCSiItb5K7ZNCaKYHuFSdjv X-Received: by 2002:a17:90a:4b41:b0:24e:3b3e:f348 with SMTP id o1-20020a17090a4b4100b0024e3b3ef348mr8015206pjl.2.1685361956770; Mon, 29 May 2023 05:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685361956; cv=none; d=google.com; s=arc-20160816; b=iGIJQwqWvrkMh6zuT6d0BxxmimMP7WM8djLoeDyD7Y2lY8FxkfJOKQFUp4xzv7vznI 0M8qr0sUryEWfMyNUd8T7laS3q92Ep7kviE/GB2Gykt9DROtD33f5E0zP/MkjxsI3vYY +mgK6n1eklvgMk9+I9e2AJ+p5HOf2xkeiDgDQykDJauhmEMAV564Ci3/Qb7azADsEbJz APpzCBux9BR13LNu5ZFdgjw5yxOiSZQYpUqM9xJYq/GhaYQNNW8658tSPv2XSFO+3fok RoSwoKZVsZBBNM2+1OVxLqivHVMSEuPPEnhyFhR1iPVpULI/f8C/ts6MCwgI5p17KW2i bV5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=qWra8Gu5wFkdrvAcUCS7+5M0BfjcLHXGObTl/UKXy08=; b=SJ69jytYt1HNuD3Vz8u50/b/YMvDTSFIZoVO19dG8+nwGjnrN9X4iThb+doKZYBIHa TOYZwbQgYOBJucanb2lFa+YCkVCuRH7fJJRsEjtkDsdffKg2CwvFMMV9JrZRbFWc51UW m20YscmEaJiQEq7h3u3esPs9Sc6PZJ0FgtukFZrBVp/kRE9WszQBv4cHW3WlV79fVc5u PXlUN4D98PL9bVv2WKoLqVIgNrhUqMdeIKdcyW9Lr6pna4EWcPQriy6/wcuvOOF0niGv YmN9aNMNOU65B8mNkQiIv4ulS2FqYPihAzcoJY8iCwKErRrkTSPiWIa3eh8fuKij79zN 4toA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fN8ad6VX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a635607000000b0053f163363c0si8573325pgb.95.2023.05.29.05.05.44; Mon, 29 May 2023 05:05:56 -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=@intel.com header.s=Intel header.b=fN8ad6VX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229691AbjE2MDw (ORCPT + 99 others); Mon, 29 May 2023 08:03:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjE2MDu (ORCPT ); Mon, 29 May 2023 08:03:50 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19CFBC7; Mon, 29 May 2023 05:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685361829; x=1716897829; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=JC6wS1E/TUOOIhq2nrfMiSXO3UBC6enXa7DxWwVAz2A=; b=fN8ad6VXfQlX3oNAWeeoMDvVBNOxeHY5MATcitDZwmRVoEnMJWaj8z9L 1OfQEPhfBeKnIheiD2aO97ERTrDy2+ZBD77oxHs8scv6etd6v/uvfYCzk jUnpVI1gOGjgObfuVNc//1uHY4aFDZ/6cCI1ZZ3hUObIwyLvxBX8Y+mTG 93y9JqUsLbR/fedmze8k+wJWot5aohGOrS1ubjI6Lf48YYSdTYHWf80iY OY+VvCkjQpLKrgPYw8nc5qSOTujknDhC+/Y+6vMz8BmDN50aVZbkEhcEd mZhTSjrPUQi71nI++/jRf7ydJtjR7V1f4CObepiOLitSRQKJyIeqdQbfF w==; X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="339278184" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="339278184" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2023 05:03:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="706042704" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="706042704" Received: from btaubert-mobl1.ger.corp.intel.com ([10.252.55.237]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2023 05:03:46 -0700 Date: Mon, 29 May 2023 15:03:43 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Mark Pearson cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/5] platform/x86: think-lmi: Correct NVME password handling In-Reply-To: <20230526171658.3886-3-mpearson-lenovo@squebb.ca> Message-ID: References: <20230526171658.3886-1-mpearson-lenovo@squebb.ca> <20230526171658.3886-3-mpearson-lenovo@squebb.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 May 2023, 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). These two sound entirely separate changes. If that's the case, please make own patch from the send change. Hmm, index_store() still allows 0, is that also related here? Please check also ABI documentation as index default seems to be mentioned there as well. -- i. > Signed-off-by: Mark Pearson > --- > Changes in v2 & v3: 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 || >