aboutsummaryrefslogtreecommitdiff
path: root/drivers/nvme/host/pci.c
diff options
context:
space:
mode:
authorGravatar Keith Busch <kbusch@kernel.org> 2023-06-28 07:48:15 -0700
committerGravatar Keith Busch <kbusch@kernel.org> 2023-06-30 10:48:15 -0700
commita2b5d5443fa7a0e9f26b31598bcc38c2b66300d9 (patch)
treeaf75fd703d4c250e77a393eefb399339473f5299 /drivers/nvme/host/pci.c
parentnvme: ensure unquiesce on teardown (diff)
downloadlinux-a2b5d5443fa7a0e9f26b31598bcc38c2b66300d9.tar.gz
linux-a2b5d5443fa7a0e9f26b31598bcc38c2b66300d9.tar.bz2
linux-a2b5d5443fa7a0e9f26b31598bcc38c2b66300d9.zip
nvme: sync timeout work on failed reset
Timeouts during reset will set the controller for failure, preventing the state change to LIVE. Ensure all timeout work is synced after the controller disabling completes to ensure we don't have any other tasks messing with any namespace request_queue's. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/host/pci.c')
-rw-r--r--drivers/nvme/host/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 8eaa954aa6ed..bfeadecf9e15 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2777,6 +2777,7 @@ static void nvme_reset_work(struct work_struct *work)
result);
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DELETING);
nvme_dev_disable(dev, true);
+ nvme_sync_queues(&dev->ctrl);
nvme_mark_namespaces_dead(&dev->ctrl);
nvme_unquiesce_io_queues(&dev->ctrl);
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD);