Commit c82c370d authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Keith Busch

nvmet: set ctrl pi_support cap before initializing cap reg

This is a preparation for setting the maximal queue size of a controller
that supports PI.
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarIsrael Rukshin <israelr@nvidia.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 63e8fd62
...@@ -1411,6 +1411,7 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, ...@@ -1411,6 +1411,7 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
kref_init(&ctrl->ref); kref_init(&ctrl->ref);
ctrl->subsys = subsys; ctrl->subsys = subsys;
ctrl->pi_support = ctrl->port->pi_enable && ctrl->subsys->pi_support;
nvmet_init_cap(ctrl); nvmet_init_cap(ctrl);
WRITE_ONCE(ctrl->aen_enabled, NVMET_AEN_CFG_OPTIONAL); WRITE_ONCE(ctrl->aen_enabled, NVMET_AEN_CFG_OPTIONAL);
......
...@@ -252,8 +252,6 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req) ...@@ -252,8 +252,6 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
if (status) if (status)
goto out; goto out;
ctrl->pi_support = ctrl->port->pi_enable && ctrl->subsys->pi_support;
uuid_copy(&ctrl->hostid, &d->hostid); uuid_copy(&ctrl->hostid, &d->hostid);
ret = nvmet_setup_auth(ctrl); ret = nvmet_setup_auth(ctrl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment