From patchwork Tue Jan 21 10:06:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Gordeev X-Patchwork-Id: 3515921 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 918C89F2D6 for ; Tue, 21 Jan 2014 10:04:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89F4A20155 for ; Tue, 21 Jan 2014 10:04:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D395B20145 for ; Tue, 21 Jan 2014 10:04:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754101AbaAUKEf (ORCPT ); Tue, 21 Jan 2014 05:04:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20239 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753871AbaAUKEf (ORCPT ); Tue, 21 Jan 2014 05:04:35 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0LA4CFv032010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 21 Jan 2014 05:04:12 -0500 Received: from dhcp-26-207.brq.redhat.com (dhcp-27-68.brq.redhat.com [10.34.27.68]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0LA48j9020942 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 21 Jan 2014 05:04:10 -0500 Date: Tue, 21 Jan 2014 11:06:12 +0100 From: Alexander Gordeev To: Keith Busch Cc: Bjorn Helgaas , Matthew Wilcox , "linux-kernel@vger.kernel.org" , linux-nvme@lists.infradead.org, "linux-pci@vger.kernel.org" Subject: [PATCH 1/2] Revert "NVMe: Disable admin queue on init failure" Message-ID: <20140121100611.GB8847@dhcp-26-207.brq.redhat.com> References: <1c441f670f33375b6c41e074baf6e84e6c7bb0c2.1389904166.git.agordeev@redhat.com> <20140120083835.GA19068@dhcp-26-207.brq.redhat.com> <20140120084212.GC19068@dhcp-26-207.brq.redhat.com> <20140121100311.GA8847@dhcp-26-207.brq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140121100311.GA8847@dhcp-26-207.brq.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit c5dc9192d52a4a3a479f701e97386347d454af84. --- drivers/block/nvme-core.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index b59a93a..c790679 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -1151,11 +1151,11 @@ static void nvme_free_queue(struct nvme_queue *nvmeq) kfree(nvmeq); } -static void nvme_free_queues(struct nvme_dev *dev, int lowest) +static void nvme_free_queues(struct nvme_dev *dev) { int i; - for (i = dev->queue_count - 1; i >= lowest; i--) { + for (i = dev->queue_count - 1; i >= 0; i--) { nvme_free_queue(dev->queues[i]); dev->queue_count--; dev->queues[i] = NULL; @@ -1989,7 +1989,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev) return 0; free_queues: - nvme_free_queues(dev, 1); + nvme_free_queues(dev); return result; } @@ -2409,7 +2409,6 @@ static int nvme_dev_start(struct nvme_dev *dev) return result; disable: - nvme_disable_queue(dev, 0); spin_lock(&dev_list_lock); list_del_init(&dev->node); spin_unlock(&dev_list_lock); @@ -2541,7 +2540,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id) shutdown: nvme_dev_shutdown(dev); release_pools: - nvme_free_queues(dev, 0); + nvme_free_queues(dev); nvme_release_prp_pools(dev); release: nvme_release_instance(dev); @@ -2565,7 +2564,7 @@ static void nvme_remove(struct pci_dev *pdev) misc_deregister(&dev->miscdev); nvme_dev_remove(dev); nvme_dev_shutdown(dev); - nvme_free_queues(dev, 0); + nvme_free_queues(dev); nvme_release_instance(dev); nvme_release_prp_pools(dev); kref_put(&dev->kref, nvme_free_dev);