summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2019-04-30 17:33:41 +0200
committerChristoph Hellwig <hch@lst.de>2019-05-01 15:17:22 +0200
commitc8e9e9b7646ebe1c5066ddc420d7630876277eb4 (patch)
tree2af3fe958a6065f38563a80bc1a1c9df25518c85 /drivers
parentnvme-pci: shutdown on timeout during deletion (diff)
downloadlinux-c8e9e9b7646ebe1c5066ddc420d7630876277eb4.tar.xz
linux-c8e9e9b7646ebe1c5066ddc420d7630876277eb4.zip
nvme-pci: unquiesce admin queue on shutdown
Just like IO queues, the admin queue also will not be restarted after a controller shutdown. Unquiesce this queue so that we do not block request dispatch on a permanently disabled controller. Reported-by: Yufen Yu <yuyufen@huawei.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/pci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 3df0f2b29427..ac10d3ad1e75 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2437,8 +2437,11 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
* must flush all entered requests to their failed completion to avoid
* deadlocking blk-mq hot-cpu notifier.
*/
- if (shutdown)
+ if (shutdown) {
nvme_start_queues(&dev->ctrl);
+ if (dev->ctrl.admin_q && !blk_queue_dying(dev->ctrl.admin_q))
+ blk_mq_unquiesce_queue(dev->ctrl.admin_q);
+ }
mutex_unlock(&dev->shutdown_lock);
}