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 2/4] nvme-pci: unquiesce admin queue before nvme_init_ctrl_finish()
Date: Fri, 20 Oct 2023 16:25:58 +0200 [thread overview]
Message-ID: <20231020142600.47246-3-hare@suse.de> (raw)
In-Reply-To: <20231020142600.47246-1-hare@suse.de>
We should be unquiesce the admin queue after setting the state to
'CONNECTING', but before calling into nvme_init_ctrl_finish().
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/nvme/host/pci.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 60a08dfe8d75..5b6dec052dfe 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2709,7 +2709,6 @@ static void nvme_reset_work(struct work_struct *work)
result = nvme_pci_enable(dev);
if (result)
goto out_unlock;
- nvme_unquiesce_admin_queue(&dev->ctrl);
mutex_unlock(&dev->shutdown_lock);
/*
@@ -2723,6 +2722,8 @@ static void nvme_reset_work(struct work_struct *work)
goto out;
}
+ nvme_unquiesce_admin_queue(&dev->ctrl);
+
result = nvme_init_ctrl_finish(&dev->ctrl, was_suspend);
if (result)
goto out;
@@ -3019,6 +3020,8 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto out_disable;
}
+ nvme_unquiesce_admin_queue(&dev->ctrl);
+
result = nvme_init_ctrl_finish(&dev->ctrl, false);
if (result)
goto out_disable;
--
2.35.3
next prev parent 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 ` [PATCH 1/4] nvme-fc: add missing quiesce in nvme_fc_create_association() Hannes Reinecke
2023-10-20 14:25 ` Hannes Reinecke [this message]
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-3-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