public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 1/4] nvme-fc: add missing quiesce in nvme_fc_create_association()
Date: Fri, 20 Oct 2023 16:25:57 +0200	[thread overview]
Message-ID: <20231020142600.47246-2-hare@suse.de> (raw)
In-Reply-To: <20231020142600.47246-1-hare@suse.de>

nvme_fc_create_association() is calling nvme_unquiesce_admin_queue(),
but does not quiesce the queue upon failure.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/fc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index a15b37750d6e..17b6c9238d68 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -3135,7 +3135,7 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
 	if (!ret && test_bit(ASSOC_FAILED, &ctrl->flags))
 		ret = -EIO;
 	if (ret)
-		goto out_disconnect_admin_queue;
+		goto out_quiesce_admin_queue;
 
 	/* sanity checks */
 
@@ -3144,7 +3144,7 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
 		dev_err(ctrl->ctrl.device, "icdoff %d is not supported!\n",
 				ctrl->ctrl.icdoff);
 		ret = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
-		goto out_disconnect_admin_queue;
+		goto out_quiesce_admin_queue;
 	}
 
 	/* FC-NVME supports normal SGL Data Block Descriptors */
@@ -3152,7 +3152,7 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
 		dev_err(ctrl->ctrl.device,
 			"Mandatory sgls are not supported!\n");
 		ret = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
-		goto out_disconnect_admin_queue;
+		goto out_quiesce_admin_queue;
 	}
 
 	if (opts->queue_size > ctrl->ctrl.maxcmd) {
@@ -3199,6 +3199,8 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
 
 out_term_aen_ops:
 	nvme_fc_term_aen_ops(ctrl);
+out_quiesce_admin_queue:
+	nvme_quiesce_admin_queue(&ctrl->ctrl);
 out_disconnect_admin_queue:
 	dev_warn(ctrl->ctrl.device,
 		"NVME-FC{%d}: create_assoc failed, assoc_id %llx ret %d\n",
-- 
2.35.3



  reply	other threads:[~2023-10-20 14:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 14:25 [PATCH 0/4] nvme: start keep-alive after admin queue setup Hannes Reinecke
2023-10-20 14:25 ` Hannes Reinecke [this message]
2023-10-20 14:25 ` [PATCH 2/4] nvme-pci: unquiesce admin queue before nvme_init_ctrl_finish() Hannes Reinecke
2023-10-20 14:25 ` [PATCH 3/4] nvme-loop: quiesce admin queue on failure Hannes Reinecke
2023-10-20 14:26 ` [PATCH 4/4] nvme: start keep-alive after admin queue setup Hannes Reinecke
2023-10-20 15:30 ` [PATCH 0/4] " Keith Busch
2023-10-23  9:54   ` Hannes Reinecke
2023-10-23 23:16     ` Keith Busch
2023-10-24  5:30       ` Hannes Reinecke

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=20231020142600.47246-2-hare@suse.de \
    --to=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --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