From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:48792 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934131AbdDFIHa (ORCPT ); Thu, 6 Apr 2017 04:07:30 -0400 Subject: Patch "nvme/pci: Disable on removal when disconnected" has been added to the 4.10-stable tree To: keith.busch@intel.com, axboe@fb.com, gregkh@linuxfoundation.org, hch@lst.de, jthumshirn@suse.de, sagi@grimberg.me Cc: , From: Date: Thu, 06 Apr 2017 10:07:09 +0200 Message-ID: <14914660295112@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled nvme/pci: Disable on removal when disconnected to the 4.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nvme-pci-disable-on-removal-when-disconnected.patch and it can be found in the queue-4.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 6db28eda266052f86a6b402422de61eeb7d2e351 Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Fri, 10 Feb 2017 18:15:49 -0500 Subject: nvme/pci: Disable on removal when disconnected From: Keith Busch commit 6db28eda266052f86a6b402422de61eeb7d2e351 upstream. If the device is not present, the driver should disable the queues immediately. Prior to this, the driver was relying on the watchdog timer to kill the queues if requests were outstanding to the device, and that just delays removal up to one second. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/nvme/host/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1990,8 +1990,10 @@ static void nvme_remove(struct pci_dev * pci_set_drvdata(pdev, NULL); - if (!pci_device_is_present(pdev)) + if (!pci_device_is_present(pdev)) { nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD); + nvme_dev_disable(dev, false); + } flush_work(&dev->reset_work); nvme_uninit_ctrl(&dev->ctrl); Patches currently in stable-queue which might be from keith.busch@intel.com are queue-4.10/nvme-pci-disable-on-removal-when-disconnected.patch queue-4.10/nvme-core-fix-race-kicking-freed-request_queue.patch