From patchwork Thu May 17 02:20:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 10405177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8440C601F7 for ; Thu, 17 May 2018 02:18:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72F9628912 for ; Thu, 17 May 2018 02:18:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66AFE28917; Thu, 17 May 2018 02:18:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F38A428912 for ; Thu, 17 May 2018 02:18:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751395AbeEQCSc (ORCPT ); Wed, 16 May 2018 22:18:32 -0400 Received: from mga04.intel.com ([192.55.52.120]:62803 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbeEQCSb (ORCPT ); Wed, 16 May 2018 22:18:31 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2018 19:18:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,408,1520924400"; d="scan'208";a="56587213" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga001.jf.intel.com with ESMTP; 16 May 2018 19:18:29 -0700 Date: Wed, 16 May 2018 20:20:31 -0600 From: Keith Busch To: Ming Lei Cc: Keith Busch , Jens Axboe , Laurence Oberman , Sagi Grimberg , James Smart , "linux-nvme@lists.infradead.org" , "linux-block@vger.kernel.org" , Jianchao Wang , Christoph Hellwig Subject: Re: [PATCH V6 11/11] nvme: pci: support nested EH Message-ID: <20180517022030.GB21959@localhost.localdomain> References: <20180516040313.13596-1-ming.lei@redhat.com> <20180516040313.13596-12-ming.lei@redhat.com> <20180516141242.GA20119@localhost.localdomain> <20180516231058.GB28727@ming.t460p> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180516231058.GB28727@ming.t460p> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Ming, I'm developing the answers in code the issues you raised. It will just take a moment to complete flushing those out. In the meantime just want to point out why I think block/011 isn't a real test. On Thu, May 17, 2018 at 07:10:59AM +0800, Ming Lei wrote: > All simulation in block/011 may happen in reality. If this test actually simulates reality, then the following one line patch (plus explanation for why) would be a real "fix" as this is very successful in passing block/011. :) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 1faa32cd07da..dcc5746304c4 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2118,6 +2118,12 @@ static int nvme_pci_enable(struct nvme_dev *dev) if (pci_enable_device_mem(pdev)) return result; + /* + * blktests block/011 disables the device without the driver knowing. + * We'll just enable the device twice to get the enable_cnt > 1 + * so that the test's disabling does absolutely nothing. + */ + pci_enable_device_mem(pdev); pci_set_master(pdev); --