From mboxrd@z Thu Jan 1 00:00:00 1970 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 5A4E4C4332F for ; Fri, 3 Nov 2023 13:59:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377681AbjKCN7H (ORCPT ); Fri, 3 Nov 2023 09:59:07 -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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.