Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1084895rdg; Fri, 13 Oct 2023 09:44:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjVpya+NiNqdor7ZoTJJyDXkiJfRIjf9PzEiRBLl0PVgXO1ENOtjHNvFjvbYYp+qteh0Yh X-Received: by 2002:a05:6358:430c:b0:133:b42:69ca with SMTP id r12-20020a056358430c00b001330b4269camr31499139rwc.18.1697215446433; Fri, 13 Oct 2023 09:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697215446; cv=none; d=google.com; s=arc-20160816; b=Y+lIvHwpI9wMJD15Z4GVAgxt+wO9TOLOivN+eZxF4eUcVPWpDo7Luq6sHkzVcFbgyW J93JASS/RfESd8wksMp5eMUAT6t3jvb1FSyTDGTLRGmekrcDqdIZdpnyQQPHo3ADVgE8 +4lrF4Gr/H6wIivdtK7OSn9Julcby2m03E4E5sHwly0/JBZjtbiReEzRRR24gubEeLOV 7AWrOm2pd5CFBKzJmyOyth/RKpA+RHQBdjKgNtxi9d69GoR++7Oxq8A74VlLXB/zhXwr 64k5xt8tkkEad5BXLoQiIqJBMm1+5phExRnMV8GQ2/ev0tkRGhrljf5AnMtyMxSJFvoJ cx+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=e1GnV6uCDMzgzvtZ3/KmT9QmzkIW0FvWBx8gE+q2uNg=; fh=+eTfAJ6ZMXyISgO1rNnlMemy6ZTODWB5sExZlgJ0ZUY=; b=X3Z5BWsbrRWEDhyR0aDcE126ZrQ1loSEC02y8an8nAuxC0GO5uDhYDi3QplBp90xKo GgwhDEfa4cT+jlRlQ4lGvCy/fFIB86pTEB//G9QLeAp4bfWAD/2KDW0OJheSwzpeqDYY 9ciFbQ1cfngMQkyvKFJMwppLfGdT0v+Ew6MIh+rEsSsHr59t6d4UVHc3EL07r+V3YzTF oTpzgrR1mU8K8VSQg/ExIMG5tDqNhxLsli0bmokUtJDIJo7XQKv7Yd1/cS0IYo+M6bwX 4FfCAeaACAYxIaIYkBPxuhqtd6Td91HbuvqTiSok/4AMb8hw+y4sEg5xQ2CAj/aTKcSd xfJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WbTDyQbr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q6-20020a056a00084600b00689f1186cfdsi10263826pfk.29.2023.10.13.09.44.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 09:44:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WbTDyQbr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A14EC8065EEB; Fri, 13 Oct 2023 09:44:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbjJMQn5 (ORCPT + 99 others); Fri, 13 Oct 2023 12:43:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbjJMQnw (ORCPT ); Fri, 13 Oct 2023 12:43:52 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6972A95 for ; Fri, 13 Oct 2023 09:43:51 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EF32C433C8; Fri, 13 Oct 2023 16:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697215431; bh=fNhicONj1ekrnfRc2uQFmE8uC7unApfdctES3UAtqYs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WbTDyQbr7+0/56UsczyfBJ8nS3mFVQfES2Fe83+LMZe5j1B5lOx2W038HcUClejtm OgErDdh+Zh+hBfoRY9TWRdiVjemnIixGyvLKiL1MiEO6+Ry9NA7GeGe0iMpx4OwOPy G1camTGX7s3RX/+fQ/0S6dT36Bi0BWm2ljexKCnkVZskzMx6OumyGtHVl0dD2Kd3MX eswvh/CcBP6KhRFj2ee72GMUZNL+W9SAZ27nPgM/23pnZR1jKXTVar2itkaoYlflhv MehZM8WTZPCeJNiRZvUFGVIKmrpmt6FsA6+Cb1dvvLgcSW3Gz5e8duc1s6/vtu7zX4 evd7rsRxp77DQ== Date: Fri, 13 Oct 2023 10:43:48 -0600 From: Keith Busch To: Daniel Wagner Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Niklas Cassel , Kenji Tomonaga Subject: Re: [PATCH v2] nvme: update firmware version after commit Message-ID: References: <20231013163420.3097-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231013163420.3097-1-dwagner@suse.de> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Fri, 13 Oct 2023 09:44:03 -0700 (PDT) On Fri, Oct 13, 2023 at 06:34:20PM +0200, Daniel Wagner wrote: > if (nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_FW_SLOT, 0, NVME_CSI_NVM, > - log, sizeof(*log), 0)) > + log, sizeof(*log), 0)) { > dev_warn(ctrl->device, "Get FW SLOT INFO log error\n"); > + goto out_free_log; > + } > + > + afi = le64_to_cpu(log->afi); > + if (afi & 0x30) { That should be 'afi & 0x70'. > + dev_info(ctrl->device, > + "Firmware is activated after next Controller Level Reset\n"); > + goto out_free_log; > + } > + > + memcpy(ctrl->subsys->firmware_rev, &log->frs[afi & 0x3], and 'afi & 0x7'.