summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2023-06-28 17:51:02 +0300
committerKeith Busch <kbusch@kernel.org>2023-06-30 20:48:20 +0300
commit4e69d4dabd2379af57b0b8fb9b0d62c23f9cd3b8 (patch)
tree0ce03217ba82e5973639e4b12d2d02de6160dd82 /drivers/nvme
parenta2b5d5443fa7a0e9f26b31598bcc38c2b66300d9 (diff)
downloadlinux-4e69d4dabd2379af57b0b8fb9b0d62c23f9cd3b8.tar.xz
nvme: disable controller on reset state failure
If the controller is not in a RESETTING state at the point of reset work, we have to conclude the controller is being deleted. Go to the cleanup on this condition to ensure proper pairing of request_queue quiesce state. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index bfeadecf9e15..c9224d39195e 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2690,7 +2690,8 @@ static void nvme_reset_work(struct work_struct *work)
if (dev->ctrl.state != NVME_CTRL_RESETTING) {
dev_warn(dev->ctrl.device, "ctrl state %d is not RESETTING\n",
dev->ctrl.state);
- return;
+ result = -ENODEV;
+ goto out;
}
/*