]>
Commit | Line | Data |
---|---|---|
37554d48 SL |
1 | From db04bb75fcd64d41d401ec56dd315c88679fa0e6 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 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 | -- | |
38 | 2.20.1 | |
39 |