Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp498237rdf; Fri, 3 Nov 2023 06:59:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF1LYCMgIeLNHhFPUtUmtYQQN2vOjcEXA38ds97FM9jNAlqtN38jz0p1oLPPb4Gw9f+9w00 X-Received: by 2002:a05:6a00:244b:b0:6be:6458:c0b5 with SMTP id d11-20020a056a00244b00b006be6458c0b5mr20282426pfj.9.1699019953982; Fri, 03 Nov 2023 06:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699019953; cv=none; d=google.com; s=arc-20160816; b=eq/MNHWU1mz8B5U9BuBlV1ZM0kwkvQapIy2PyH+29kJYjGHHzgyR4GXPzj4ZgvyIHZ RDw52OgoL157hoiVMcTDJ2kjND26wV7D4G6FmjuTyUw0fil6TV8hVcmQt+WABlonsT0C 8kL7lX6WU0P01/cue5XsOQaraekuO2j9BcwUFEVV1CRfhfaLv5I3WIwMP+b3PD/unoKm ZqGNnh63ooatDF31S5VtQ+0rXsBIv4ZNR19oHr9Qg9wrFu4dncUSXE1dV+yyfL25GiqU eSbsQHt3dbJce/4hYARlSmcMnScCT7PRa8eDRV5Qbbgnl6+MWur8qf3Uyw+XrmCBk9nm Ohkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DO6xt+8UaXSfIekXCYnHWzjjj/SoZBInVpsXJN5LjXk=; fh=2sdwZI+AyrWYorYkPEWQPveewLhsyBRlhj9Ya0OxId0=; b=GEE72GTO2O5KMAnFx16fW9vCf6Ktug726oSsKwGUFwophgH78wdXRPCdRVWUnFfkGB 5+xJR8H8A3EY/N+uJfHa8LW3w/K/arFbfJOp1Ry8lZ4j5jJcS//rOX375TNProjSbseC bHPF+qVWZRIt23u88xmfnSMiAuDSMTHyE6tJmnLfmQ9BeXAWYFwvOcFb985RAKAo0uFV HShQ1dESMUeTrn+V+rWV2PwC7t6iiHks6tx/CwBpWQcZM1V4lpjXDTAh8RLiUXhu2O5V l7xnVwdS7Y0fbMh9Iz4x1GmcX06vf5Mx/5KyPWkVy87M9RVDU+Kj9HGH3uRDb7jYHyXV fqxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y25-20020a056a00181900b006c06614f4b1si1588127pfa.137.2023.11.03.06.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:59:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9F5C981EE2DB; Fri, 3 Nov 2023 06:59:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377686AbjKCN7G (ORCPT + 99 others); Fri, 3 Nov 2023 09:59:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233045AbjKCN7E (ORCPT ); Fri, 3 Nov 2023 09:59:04 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F4C31BC for ; Fri, 3 Nov 2023 06:59:01 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id EC89867373; Fri, 3 Nov 2023 14:58:57 +0100 (CET) Date: Fri, 3 Nov 2023 14:58:57 +0100 From: Christoph Hellwig To: Daniel Wagner Cc: Keith Busch , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Niklas Cassel , Kenji Tomonaga Subject: Re: [PATCH v3] nvme: update firmware version after commit Message-ID: <20231103135857.GA1871@lst.de> References: <20231030160044.20355-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 03 Nov 2023 06:59:11 -0700 (PDT) On Fri, Nov 03, 2023 at 01:11:02PM +0100, Daniel Wagner wrote: > This particular firmware seem to interpret afi one based, while > the this patch assumes it is zero based > Active Firmware Info (AFI): Specifies information about the active > firmware revision. > > Bit 7 is reserved. > Bits 6:4 indicates the firmware slot that is going to be activated > at the next Controller Level Reset. If this field is 0h, > then the controller does not indicate the firmware slot that > is going to be activated at the next Controller Level Reset. > Bit 3 is reserved. > Bits 2:0 indicates the firmware slot from which the actively running > firmware revision was loaded. > > > It's not clear to me if afi bits 2:0 is zero or one based. Bits 6:4 > indicate to be 1 based. All 0's based (what a stupid term..) fields in NVMe are explicitly marked as such. And even if that wasn't the case I'd very much expect the same encoding for the two sub-fields.