Skip to content

Commit c82c370

Browse files
mgurtovoykeithbusch
authored andcommitted
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: Christoph Hellwig <hch@lst.de> Reviewed-by: Israel Rukshin <israelr@nvidia.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent 63e8fd6 commit c82c370

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/nvme/target/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,7 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
14111411

14121412
kref_init(&ctrl->ref);
14131413
ctrl->subsys = subsys;
1414+
ctrl->pi_support = ctrl->port->pi_enable && ctrl->subsys->pi_support;
14141415
nvmet_init_cap(ctrl);
14151416
WRITE_ONCE(ctrl->aen_enabled, NVMET_AEN_CFG_OPTIONAL);
14161417

drivers/nvme/target/fabrics-cmd.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,6 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
252252
if (status)
253253
goto out;
254254

255-
ctrl->pi_support = ctrl->port->pi_enable && ctrl->subsys->pi_support;
256-
257255
uuid_copy(&ctrl->hostid, &d->hostid);
258256

259257
ret = nvmet_setup_auth(ctrl);

0 commit comments

Comments
 (0)