summary refs log tree commit diff
path: root/drivers/nvme/host/core.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2018-05-24 16:18:17 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-25 16:50:12 +0200
commit181303d03525ea52d2d002fb8ee04e769aaa4ce4 (patch)
tree42e1e131ce659503db599ec908636006f6c16246 /drivers/nvme/host/core.c
parent461fbc8f0ed1ac18ce6b7bf7ab0b7444f7c7ff57 (diff)
downloadlinux-181303d03525ea52d2d002fb8ee04e769aaa4ce4.tar.gz
nvme-fabrics: allow duplicate connections to the discovery controller
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@suse.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/core.c')
-rw-r--r--drivers/nvme/host/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index dc8aa2c1c22a..fd206a6adad5 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2184,7 +2184,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);