]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.14/nvme-pci-unquiesce-admin-queue-on-shutdown.patch
fixes for 4.14
[thirdparty/kernel/stable-queue.git] / queue-4.14 / nvme-pci-unquiesce-admin-queue-on-shutdown.patch
1 From 25c1d1e6aad2722f1104e36b68ba30b0ebffe9ed Mon Sep 17 00:00:00 2001
2 From: Keith Busch <keith.busch@intel.com>
3 Date: Tue, 30 Apr 2019 09:33:41 -0600
4 Subject: nvme-pci: unquiesce admin queue on shutdown
5
6 [ Upstream commit c8e9e9b7646ebe1c5066ddc420d7630876277eb4 ]
7
8 Just like IO queues, the admin queue also will not be restarted after a
9 controller shutdown. Unquiesce this queue so that we do not block
10 request dispatch on a permanently disabled controller.
11
12 Reported-by: Yufen Yu <yuyufen@huawei.com>
13 Signed-off-by: Keith Busch <keith.busch@intel.com>
14 Signed-off-by: Christoph Hellwig <hch@lst.de>
15 Signed-off-by: Sasha Levin <sashal@kernel.org>
16 ---
17 drivers/nvme/host/pci.c | 5 ++++-
18 1 file changed, 4 insertions(+), 1 deletion(-)
19
20 diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
21 index 06355ca832db..cd11cced3678 100644
22 --- a/drivers/nvme/host/pci.c
23 +++ b/drivers/nvme/host/pci.c
24 @@ -2105,8 +2105,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 --
38 2.20.1
39