nvme-pci: unquiesce dead controller queues
authorKeith Busch <keith.busch@intel.com>
Wed, 6 Jun 2018 14:13:08 +0000 (08:13 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Jun 2018 18:51:11 +0000 (12:51 -0600)
This patch ensures the nvme namsepace request queues are not quiesced
on a surprise removal. It's possible the queues were previously killed
in a failed reset, so the queues need to be unquiesced to ensure all
requests are flushed to completion.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c

index 7f8b1bd03db49f7c41959a080e8487fde26f7ffb..d935aba0288f109c5ee26b1ba5610f2a13f5b3dc 100644 (file)
@@ -2599,7 +2599,7 @@ static void nvme_remove(struct pci_dev *pdev)
 
        if (!pci_device_is_present(pdev)) {
                nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD);
-               nvme_dev_disable(dev, false);
+               nvme_dev_disable(dev, true);
        }
 
        flush_work(&dev->ctrl.reset_work);