Skip to content

Commit

Permalink
nvme: send Identify with CNS 06h only to I/O controllers
Browse files Browse the repository at this point in the history
Identify CNS 06h (I/O Command Set Specific Identify Controller data
structure) is supported only on i/o controllers.

But nvme_init_non_mdts_limits() currently invokes this on all
controllers.  Correct this by ensuring this is sent to I/O
controllers only.

Signed-off-by: Martin George <marting@netapp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Martin George authored and Christoph Hellwig committed Mar 22, 2023
1 parent 9d2789a commit def84ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3063,7 +3063,8 @@ static int nvme_init_non_mdts_limits(struct nvme_ctrl *ctrl)
else
ctrl->max_zeroes_sectors = 0;

if (nvme_ctrl_limited_cns(ctrl))
if (ctrl->subsys->subtype != NVME_NQN_NVME ||
nvme_ctrl_limited_cns(ctrl))
return 0;

id = kzalloc(sizeof(*id), GFP_KERNEL);
Expand Down

0 comments on commit def84ab

Please sign in to comment.