Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1280333rwd; Thu, 1 Jun 2023 13:07:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4K9dgIwOVV27W7vsDuZo9i2ML0B5hpR0ZnQcV5Ve7tzl475l18/EB6SGtr/ba3qlpy8oi2 X-Received: by 2002:a17:903:2586:b0:1ae:5914:cbec with SMTP id jb6-20020a170903258600b001ae5914cbecmr407803plb.10.1685650074357; Thu, 01 Jun 2023 13:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685650074; cv=none; d=google.com; s=arc-20160816; b=lTKO3+G/qFdJA1uwUgxmOn94TUPrqTdpwvFg/c5ae9eqQlgYnr0S+3dsdQrjtpjI8e d61p8Qa0Ly9Fzx2tRS0UqHQBSkHYzd6tAY8lN0Xm0SGFgyPacSC4ng+7+/KfOIBigtIw h4AgBpUzJaAe3wsY8Lb6xrIvtK6lp36r0ZxTOEfQ3YZSicXUFyqBmmHrgI65fnQRujFk xtgB9DcfCltKLpoYjwzK3pz2klNIljOa5FDx4d4k+IWEZTIo1dXTSQRFNoBr/NFd5qSB CgpQsFdX/5hIJu92fzatmsw9sdRjswJjMgtivdVvugpdILfln2WDLvZPRC4HczvrBdNc 4G1w== 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=dxVy3ktA+8k714kk6B+Z5XPnFHTfcK197zZKcwM4lPc=; b=HKuY51b6o85T0NuwcEh51+t1yrOwi7/2Pe4u34CBxFgpGVs/BDhVcTw/Dl/fsSLP8E ciReh6V7guy9rKRTf+RtCo6sVmPcJyenPdiLr0U+8NWG/nJODYqbMNletZni7mMxz0OL gbwEBSPiTz0dFdz8YP3OkxN/f9PVfMqzk62fJJZULazhQGFF95zYpa8ZxKJq8/tUPTDK ZqhkMFYL8sQwr/RVql/uC/No6nA/BG+WlBt8Jw4ITG2uhzlunLf83HV2ERBqd9P1tFVg UOpkwk4+QRKASytAVxdJ7XrNt1URdDa4LONiczP3/fArJbPcI+NFIaPU2dmFzwZJLUyE zqwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=Lva76V+N; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=LnAG8HDY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 4-20020a170902c14400b001b074fbdce3si3095587plj.478.2023.06.01.13.07.42; Thu, 01 Jun 2023 13:07:54 -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=Lva76V+N; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=LnAG8HDY; 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 S232010AbjFAUGY (ORCPT + 99 others); Thu, 1 Jun 2023 16:06:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231724AbjFAUGI (ORCPT ); Thu, 1 Jun 2023 16:06:08 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FEE919A; Thu, 1 Jun 2023 13:06:07 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 856AE320091A; Thu, 1 Jun 2023 16:06:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 01 Jun 2023 16:06:07 -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=1685649966; x= 1685736366; bh=dxVy3ktA+8k714kk6B+Z5XPnFHTfcK197zZKcwM4lPc=; b=L va76V+N+KAZ+6lBIWyzeIKPpaIFxFTDx7itudSnVXPv8WulpZXbFWT1cDdYeuTK7 WIwjrmsKFmlztMmlhWz4YK+7b4uNWC1mK77aUtJAHtGdFPoU8LMVEOjFGX1FuLux XY9dzSdHL5apB8AAY49Cdl1ow03e54l4qACQ6QXUpeiOZT6CiHOxER6z68tmD7/z rrntV+fm9opTs25YBRefT4bZg9kRh18XcCjX5HaH9ym4Rr8qdsYo8XWl0BYm/9Zz xC1pRTXge8lyLEVzxHBboj6xEuzPmysZ6FpAcD83hTIB7tYEEx/sJDasp2rD/PDS AMNvFzw8V0nfZk4KZFHLQ== 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=1685649966; x= 1685736366; bh=dxVy3ktA+8k714kk6B+Z5XPnFHTfcK197zZKcwM4lPc=; b=L nAG8HDYpRtkNtq1K2UW0LLzpc693JnHIhQkMF3+HRjGZTzuG/vBjBsjmhrQMuIrw 2XwsJNbJOUwcIeALitkKSXoOsH6EbYK2xsoHZ8Pk5PxzOW39gM0cFHBb5gYs2xBz R8omuJTbUf4Nx+qc5TzCfhHGiQiccX5nMJilZIpzonDyaPcVlo6PHafeieyczOab UQ3zyywGD4OKHfv09dUb/3yN8h+F4uhVertPp1F7NWoKEPb7dghoHMNCZQHDJLtE JBFPoVDarPz3JVoEUeTKpnM25DYl4tIPUM+DT8/MqOTGPeeY6Y69Bi5nrIfwQmOA Ec9eu95tAugsT2FnaDLGA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeluddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Jun 2023 16:06:05 -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 7/8] platform/x86: think-lmi: Correct NVME index default Date: Thu, 1 Jun 2023 16:05:51 -0400 Message-Id: <20230601200552.4396-7-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 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 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 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: Mark Pearson --- Changes in v4: - New patch. Split out changes into separate commit as requested. - Update documentation. - Details on zero index added to commit message. Documentation/ABI/testing/sysfs-class-firmware-attributes | 4 ++-- drivers/platform/x86/think-lmi.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-firmware-attributes b/Documentation/ABI/testing/sysfs-class-firmware-attributes index 4cdba3477176..1b3ecae80b3d 100644 --- a/Documentation/ABI/testing/sysfs-class-firmware-attributes +++ b/Documentation/ABI/testing/sysfs-class-firmware-attributes @@ -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 diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 71bbe169c77e..2aaaee879488 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -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 || -- 2.40.1