summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2018-05-24 17:18:15 +0300
committerChristoph Hellwig <hch@lst.de>2018-05-25 17:50:12 +0300
commit461fbc8f0ed1ac18ce6b7bf7ab0b7444f7c7ff57 (patch)
tree46c4eb92a064c1e0b0d8ed89f010cb4d4e9aabf1 /drivers
parentffecb0b452d5cbdd2ac3614bdf6cd39ba47b0cb8 (diff)
downloadlinux-461fbc8f0ed1ac18ce6b7bf7ab0b7444f7c7ff57.tar.xz
nvme-fabrics: centralize discovery controller defaults
When connecting to the discovery controller we have certain defaults to observe, so centralize them to avoid inconsistencies due to argument ordering. 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')
-rw-r--r--drivers/nvme/host/fabrics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 6fdf499d16b4..5ad6104577f0 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -689,10 +689,6 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
opts->discovery_nqn =
!(strcmp(opts->subsysnqn,
NVME_DISC_SUBSYS_NAME));
- if (opts->discovery_nqn) {
- opts->kato = 0;
- opts->nr_io_queues = 0;
- }
break;
case NVMF_OPT_TRADDR:
p = match_strdup(args);
@@ -851,6 +847,10 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
}
}
+ if (opts->discovery_nqn) {
+ opts->kato = 0;
+ opts->nr_io_queues = 0;
+ }
if (ctrl_loss_tmo < 0)
opts->max_reconnects = -1;
else