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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52684C433EF for ; Wed, 17 Nov 2021 11:23:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE91361B96 for ; Wed, 17 Nov 2021 11:23:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EE91361B96 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:41698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnJ2G-0007ef-V9 for qemu-devel@archiver.kernel.org; Wed, 17 Nov 2021 06:23:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnJ1f-0006iL-Fb; Wed, 17 Nov 2021 06:22:51 -0500 Received: from mga04.intel.com ([192.55.52.120]:48956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnJ1d-0000fo-A4; Wed, 17 Nov 2021 06:22:51 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10170"; a="232650354" X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="232650354" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2021 03:22:41 -0800 X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="506871036" Received: from lgieryk-mobl1.ger.corp.intel.com (HELO lgieryk-VirtualBox) ([10.252.45.39]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2021 03:22:39 -0800 Date: Wed, 17 Nov 2021 12:22:31 +0100 From: =?utf-8?Q?=C5=81ukasz?= Gieryk To: Keith Busch Subject: Re: [PATCH v2 08/15] hw/nvme: Implement the Function Level Reset Message-ID: <20211117112231.GA15417@lgieryk-VirtualBox> References: <20211116153446.317143-1-lukasz.gieryk@linux.intel.com> <20211116153446.317143-9-lukasz.gieryk@linux.intel.com> <20211116212819.GA2987582@dhcp-10-100-145-180.wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211116212819.GA2987582@dhcp-10-100-145-180.wdc.com> User-Agent: Mutt/1.9.4 (2018-02-28) Received-SPF: none client-ip=192.55.52.120; envelope-from=lukasz.gieryk@linux.intel.com; helo=mga04.intel.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Klaus Jensen , Klaus Jensen , qemu-devel@nongnu.org, qemu-block@nongnu.org, Lukasz Maniak Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, Nov 16, 2021 at 01:28:19PM -0800, Keith Busch wrote: > On Tue, Nov 16, 2021 at 04:34:39PM +0100, Łukasz Gieryk wrote: > > if (!pci_is_vf(&n->parent_obj) && n->params.sriov_max_vfs) { > > - pcie_sriov_pf_disable_vfs(&n->parent_obj); > > + if (rst != NVME_RESET_CONTROLLER) { > > + pcie_sriov_pf_disable_vfs(&n->parent_obj); > > Shouldn't this be 'if (rst == NVME_RESET_FUNCTION)'? The NVMe Spec lists five possible reset types (triggers). According to my understanding, only the Controller Reset doesn’t affect the VFs' state, hence the '!='.