summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-04-12 09:16:06 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:52:22 +0200
commit1908ca222b3656f7607e5bde4fe350c6051791f0 (patch)
treecae66ffbe92d07aff85aa71204b6b1d655bf1ab9
parent145b7e06de33bafc7662f356f8bc25e1db285b3f (diff)
downloadlinux-stable-1908ca222b3656f7607e5bde4fe350c6051791f0.tar.gz
linux-stable-1908ca222b3656f7607e5bde4fe350c6051791f0.tar.bz2
linux-stable-1908ca222b3656f7607e5bde4fe350c6051791f0.zip
nvme: don't send keep-alives to the discovery controller
[ Upstream commit 74c6c71530847808d4e3be7b205719270efee80c ] NVMe over Fabrics 1.0 Section 5.2 "Discovery Controller Properties and Command Support" Figure 31 "Discovery Controller – Admin Commands" explicitly listst all commands but "Get Log Page" and "Identify" as reserved, but NetApp report the Linux host is sending Keep Alive commands to the discovery controller, which is a violation of the Spec. We're already checking for discovery controllers when configuring the keep alive timeout but when creating a discovery controller we're not hard wiring the keep alive timeout to 0 and thus remain on NVME_DEFAULT_KATO for the discovery controller. This can be easily remproduced when issuing a direct connect to the discovery susbsystem using: 'nvme connect [...] --nqn=nqn.2014-08.org.nvmexpress.discovery' Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Fixes: 07bfcd09a288 ("nvme-fabrics: add a generic NVMe over Fabrics library") Reported-by: Martin George <marting@netapp.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/nvme/host/fabrics.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 8cd42544c90e..740aae51e1c6 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -606,8 +606,10 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
opts->discovery_nqn =
!(strcmp(opts->subsysnqn,
NVME_DISC_SUBSYS_NAME));
- if (opts->discovery_nqn)
+ if (opts->discovery_nqn) {
+ opts->kato = 0;
opts->nr_io_queues = 0;
+ }
break;
case NVMF_OPT_TRADDR:
p = match_strdup(args);