From: Keith Busch <kbusch@meta.com>
To: <linux-nvme@lists.infradead.org>, <hch@lst.de>,
<sagi@grimberg.me>, <ming.lei@redhat.com>
Cc: <brookxu.cn@gmail.com>, Keith Busch <kbusch@kernel.org>
Subject: [PATCH 3/3] nvme: disable controller on reset state failure
Date: Wed, 28 Jun 2023 07:58:14 -0700 [thread overview]
Message-ID: <20230628145814.1068653-3-kbusch@meta.com> (raw)
In-Reply-To: <20230628145814.1068653-1-kbusch@meta.com>
From: Keith Busch <kbusch@kernel.org>
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.
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/nvme/host/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index bfeadecf9e15b..c9224d39195e5 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;
}
/*
--
2.34.1
next prev parent reply other threads:[~2023-06-28 14:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 14:58 [PATCH 1/3] nvme: ensure unquiesce on teardown Keith Busch
2023-06-28 14:58 ` [PATCH 2/3] nvme: sync timeout work on failed reset Keith Busch
2023-06-29 5:22 ` Christoph Hellwig
2023-06-28 14:58 ` Keith Busch [this message]
2023-06-29 5:23 ` [PATCH 3/3] nvme: disable controller on reset state failure Christoph Hellwig
2023-06-29 5:22 ` [PATCH 1/3] nvme: ensure unquiesce on teardown Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230628145814.1068653-3-kbusch@meta.com \
--to=kbusch@meta.com \
--cc=brookxu.cn@gmail.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=ming.lei@redhat.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox