summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorChristoph Hellwig2018-11-20 16:57:54 +0100
committerGreg Kroah-Hartman2018-12-17 09:24:40 +0100
commit1bda8b7996656c85005db7ac2a86b797c7f6cd1d (patch)
treebad41cd490517463700c6047135780186f254a2c /drivers/nvme/host/nvme.h
parentfscache, cachefiles: remove redundant variable 'cache' (diff)
downloadkernel-qcow2-linux-1bda8b7996656c85005db7ac2a86b797c7f6cd1d.tar.gz
kernel-qcow2-linux-1bda8b7996656c85005db7ac2a86b797c7f6cd1d.tar.xz
kernel-qcow2-linux-1bda8b7996656c85005db7ac2a86b797c7f6cd1d.zip
nvme: warn when finding multi-port subsystems without multipathing enabled
[ Upstream commit 14a1336e6fff47dd1028b484d6c802105c58e2ee ] Without CONFIG_NVME_MULTIPATH enabled a multi-port subsystem might show up as invididual devices and cause problems, warn about it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r--drivers/nvme/host/nvme.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index bb4a2003c097..60220de2db52 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -537,6 +537,9 @@ static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
static inline int nvme_mpath_init(struct nvme_ctrl *ctrl,
struct nvme_id_ctrl *id)
{
+ if (ctrl->subsys->cmic & (1 << 3))
+ dev_warn(ctrl->device,
+"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
return 0;
}
static inline void nvme_mpath_uninit(struct nvme_ctrl *ctrl)