From mboxrd@z Thu Jan 1 00:00:00 1970 From: krisman@linux.vnet.ibm.com (Gabriel Krisman Bertazi) Date: Wed, 05 Oct 2016 22:47:33 -0300 Subject: [PATCH 2/2] nvme: Delete created IO queues on reset In-Reply-To: <1475699566-5284-2-git-send-email-keith.busch@intel.com> (Keith Busch's message of "Wed, 5 Oct 2016 16:32:46 -0400") References: <1475699566-5284-1-git-send-email-keith.busch@intel.com> <1475699566-5284-2-git-send-email-keith.busch@intel.com> Message-ID: <87eg3ui6yy.fsf@linux.vnet.ibm.com> Keith Busch writes: > Commit c21377f8 (Suspend all queues before deletion) decrements the > online queue count prior to our attempt to delete those IO queues, so > the driver ended up not having the controller delete any. This patch > uses the queue_count instead of online_queues. hmm, this is obviously correct. Nice catch. Shame I missed it :( Reviewed-by: Gabriel Krisman Bertazi > > Signed-off-by: Keith Busch > --- > drivers/nvme/host/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > index 108d301..670f0cb 100644 > --- a/drivers/nvme/host/pci.c > +++ b/drivers/nvme/host/pci.c > @@ -1512,7 +1512,7 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode) > > static void nvme_disable_io_queues(struct nvme_dev *dev) > { > - int pass, queues = dev->online_queues - 1; > + int pass, queues = dev->queue_count - 1; > unsigned long timeout; > u8 opcode = nvme_admin_delete_sq; -- Gabriel Krisman Bertazi