]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.51/nvme-pci-unquiesce-admin-queue-on-shutdown.patch
Linux 4.19.51
[thirdparty/kernel/stable-queue.git] / releases / 4.19.51 / nvme-pci-unquiesce-admin-queue-on-shutdown.patch
CommitLineData
37554d48
SL
1From db04bb75fcd64d41d401ec56dd315c88679fa0e6 Mon Sep 17 00:00:00 2001
2From: Keith Busch <keith.busch@intel.com>
3Date: Tue, 30 Apr 2019 09:33:41 -0600
4Subject: nvme-pci: unquiesce admin queue on shutdown
5
6[ Upstream commit c8e9e9b7646ebe1c5066ddc420d7630876277eb4 ]
7
8Just like IO queues, the admin queue also will not be restarted after a
9controller shutdown. Unquiesce this queue so that we do not block
10request dispatch on a permanently disabled controller.
11
12Reported-by: Yufen Yu <yuyufen@huawei.com>
13Signed-off-by: Keith Busch <keith.busch@intel.com>
14Signed-off-by: Christoph Hellwig <hch@lst.de>
15Signed-off-by: Sasha Levin <sashal@kernel.org>
16---
17 drivers/nvme/host/pci.c | 5 ++++-
18 1 file changed, 4 insertions(+), 1 deletion(-)
19
20diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
21index 7b9ef8e734e7..377f6fff420d 100644
22--- a/drivers/nvme/host/pci.c
23+++ b/drivers/nvme/host/pci.c
24@@ -2187,8 +2187,11 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
25 * must flush all entered requests to their failed completion to avoid
26 * deadlocking blk-mq hot-cpu notifier.
27 */
28- if (shutdown)
29+ if (shutdown) {
30 nvme_start_queues(&dev->ctrl);
31+ if (dev->ctrl.admin_q && !blk_queue_dying(dev->ctrl.admin_q))
32+ blk_mq_unquiesce_queue(dev->ctrl.admin_q);
33+ }
34 mutex_unlock(&dev->shutdown_lock);
35 }
36
37--
382.20.1
39