From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH 3/3] nvme: allow duplicate connections to the discovery controller
Date: Thu, 24 May 2018 16:18:17 +0200 [thread overview]
Message-ID: <20180524141817.127576-4-hare@suse.de> (raw)
In-Reply-To: <20180524141817.127576-1-hare@suse.de>
The whole point of the discovery controller is that it can accept
multiple connections. Additionally the cmic field is not even defined for
the discovery controller identify page.
Signed-off-by: Hannes Reinecke <hare at suse.com>
---
drivers/nvme/host/core.c | 3 ++-
drivers/nvme/host/fabrics.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 10b180b8ccf4..28ac580b07e5 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2494,7 +2494,8 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
* Verify that the subsystem actually supports multiple
* controllers, else bail out.
*/
- if (nvme_active_ctrls(found) && !(id->cmic & (1 << 1))) {
+ if (!ctrl->opts->discovery_nqn &&
+ nvme_active_ctrls(found) && !(id->cmic & (1 << 1))) {
dev_err(ctrl->device,
"ignoring ctrl due to duplicate subnqn (%s).\n",
found->subnqn);
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 997d8677ab44..a29b0f00a88d 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -858,6 +858,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
if (opts->discovery_nqn) {
opts->kato = 0;
opts->nr_io_queues = 0;
+ opts->duplicate_connect = true;
}
if (ctrl_loss_tmo < 0)
opts->max_reconnects = -1;
--
2.12.3
next prev parent reply other threads:[~2018-05-24 14:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-24 14:18 [PATCH 0/3] nvme: fix stuck discovery Hannes Reinecke
2018-05-24 14:18 ` [PATCH 1/3] nvme: centralize discovery controller defaults Hannes Reinecke
2018-05-24 20:31 ` James Smart
2018-05-25 8:55 ` Christoph Hellwig
2018-05-24 14:18 ` [PATCH 2/3] nvme: avoid reconnection for the discovery controller Hannes Reinecke
2018-05-24 20:30 ` James Smart
2018-05-25 6:43 ` Hannes Reinecke
2018-05-24 14:18 ` Hannes Reinecke [this message]
2018-05-24 20:31 ` [PATCH 3/3] nvme: allow duplicate connections to " James Smart
2018-05-25 8:56 ` Christoph Hellwig
2018-06-18 16:11 ` James Smart
2018-06-18 22:54 ` Hannes Reinecke
2018-06-18 23:57 ` James Smart
2018-06-19 10:05 ` 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=20180524141817.127576-4-hare@suse.de \
--to=hare@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).